<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Digi-Nose Part 2: Enhancing Accuracy and Eficiency of a Digital Nose System With Sensor Technology for Early Detection of Changes in the Forest</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Leo Bilješko</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Georg Roman Schneider</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Claudia Probst</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>4th International Workshop on Camera Traps</institution>
          ,
          <addr-line>AI, and Ecology</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>FH Oberösterreich University of Applied Sciences Upper Austria</institution>
          ,
          <addr-line>Roseggerstraße 15, 4600 Wels</addr-line>
          ,
          <country country="AT">Austria</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The detection of forest health has become significant for maintaining the forest environment, especially now in the time of increasing ecological stressors. The objective of this project is to design an electronic nose (e-nose) using metal-oxide (MOx) gas sensors to be able to distinguish between healthy and stressed trees by detecting unique volatile organic components (VOCs). The project involved the development and implementation of a gas sensor array, combining multiple MOx sensors, to detect VOCs. Taking advantage of the Arduino microcontroller, data was able to be received from gas sensors, while Python was utilized for data analysis. Data analysis involved machine learning methods, such as Linear Discriminant Analysis (LDA) and Principal Component Analysis (PCA), for classification and dimensionality reduction of the sensor data. Python also came in handy for the creation of graphical user interfaces. The capacity of the e-noses to diferentiate between healthy and sick trees was demonstrated in the initial results, where it showed a reasonable level of accuracy. Initially, PCA provided good separation, however, with an increased number of target gases, the separation accuracy deteriorated. The LDA provided a clear separation between two classes, with slight overlaps. The e-nose was further assessed for diferent substances that may be present in stressed trees. Although it has shown the good separability of some substances, others overlapped. The great sensitivity of the MOx sensor comes with a cost of selectivity for diferent gases. Future research will focus on detecting these specific substances contained in the tree's odor using a neural network, enhancing the electronic nose's ability to detect a wider range of compounds.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;e-nose</kwd>
        <kwd>VOCs</kwd>
        <kwd>MOx gas sensor</kwd>
        <kwd>machine learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>In recent years, the detection of forest health has become critical for maintaining the
forest environment and agricultural richness. Trees, like other living species, produce
volatile organic compounds (VOCs) as part of their normal everyday activities. When
stress is initiated, such as from diseases or environmental changes like drought and
deluge, the concentration of VOCs that trees produce can be increased significantly.
Recent studies of electronic nose technology have unlocked new alternative approaches to
monitoring forest health through the detection of odor fingerprints.</p>
      <p>
        Conventionally, Gas Chromatography-Mass Spectrometry (GC-MS) has been a standard
for the detection of VOCs. Despite the fact that it ofers high accuracy and sensitivity,
GC-MS requires higher complexity and skills to operate. Due to these challenges, a
real-time observation of a tree’s health would be complex. Metal-oxide (MOx) sensors
ofer a great, accessible, and cost-efective alternative due to their wide range of sensitivity
to various gases. The change of the gas or the concentration of the gas is detected by the
metal-oxide layer’s resistance, which makes it suitable for environmental monitoring.
MOx gas sensor technology has been increasing in recent years in many applications,
including air quality control, food quality monitoring, and medical applications, featuring
its efectiveness in many fields [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ][
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>In this study, an electronic nose system was developed for detecting the health level of
a tree using MOx sensors. A system was developed to gather and analyze the odors
emitted by stressed and unstressed conditions. Machine learning methods such as
Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA) have
been employed to categorize diferent smells from trees and create a fingerprint for their
detection. The process also involved the design of a graphical user interface (GUI) to
enable real-time monitoring of changes.</p>
      <p>By merging advanced sensor technology and machine learning methods, the goal is to
provide a reliable, cost-efective tool for early detection of trees’ health. Furthermore,
this system has the potential to be applied to other agricultural practices and thereby
contribute to environmental sustainability. This approach aims to ofer an alternative to
a more common GC-MS, taking advantage of cost-efective and more accessible MOx
sensors, to enable widespread, real-time monitoring of tree health.</p>
    </sec>
    <sec id="sec-2">
      <title>2. THEORY</title>
      <sec id="sec-2-1">
        <title>2.1. Metal-oxide (MOx) gas sensors</title>
        <p>
          MOx sensors, which are resistive sensors made from metal-oxide semiconductors, have
been accepted as a promising possibility to develop low-cost, highly eficient sensors
with fast response and recovery times. Due to their simple mechanism for measuring
resistance and their high sensitivity to diferent gases, these devices are often used to
detect volatile compounds (VOCs) at ppm and sub-ppm levels. These sensors have
applications in the agriculture and forestry industries to detect plant infections caused
by fungus, bacteria, and viruses, as well as damage caused by insects or mechanical means.
The working principle of the MOX device is based on the changes in the electrical
resistance of a metal oxide semiconductor when it encounters gases at elevated
temperatures (150-500 °C) [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. The MOx sensors are susceptible to humidity and
temperature, so the addition of a heater allows it to operate at controlled conditions and
temperatures [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>In this work, MOx sensor are a main type of sensors used to develop a possible solution
for the detection of forest health. Their implementation will be discussed in further
sections.</p>
        <sec id="sec-2-1-1">
          <title>2.1.1. Resistance measurement</title>
          <p>The important parameter of MOx sensors is the resistance of the sensitive layer.
Depending on the type of gas surrounding the sensor, resistance varies. Based on this
change, the goal is to define unique resistance for a specific gas.</p>
          <p>The measurement of sensitive layer resistance (RS) is typically measured using a voltage
divider principle with a load resistor (RL). This approach is favored for its simplicity
and efectiveness in converting resistance changes into measurable voltage signals. Figure
1 shows a simplified equivalent circuit of a gas sensor, consisting of heater resistance R H,
sensitive layer resistance RS, and load resistance RL.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Machine learning algorithms</title>
        <p>Machine learning can be described as a set of algorithms and statistical methods
that can automatically recognize patterns in data and then use the unknown patterns
to accurately predict upcoming data or perform other kinds of decision-making under
uncertainty. Usually, machine learning is categorized into two main types: predictive or
supervised learning and descriptive or unsupervised learning.</p>
        <sec id="sec-2-2-1">
          <title>2.2.1. Supervised learning:</title>
          <p>
            In a supervised approach, the goal is to learn mapping from inputs to outputs so
that it can predict the output of new, unseen inputs. An algorithm is provided with
a labeled set of input-output pairs, known as the training set. An algorithm utilizes
a training set to discover and learn a connection between the inputs and the outputs,
giving it the ability to predict new data [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ].
          </p>
          <p>Supervised learning has two objectives to accomplish:
• Classification: The output variable is a class (e.g., a healthy or unhealthy tree).
• Regression: To predict the future value of the output variable.</p>
        </sec>
        <sec id="sec-2-2-2">
          <title>2.2.2. Unsupervised learning:</title>
          <p>In unsupervised learning, the goal is to find hidden patterns in the data
provided. It is less defined than supervised learning since it is not given what kinds of
patterns to look for and what the desired output is for each input. The advantage
that unsupervised learning provides over supervised learning is that it does not
require human intervention to manually label the data, which speeds up the data processing.
Unsupervised learning goals to achieve:
• Clustering: grouping the data that has similar features.
• Dimensionality reduction: reducing the number of input features while keeping as
much information as possible.</p>
        </sec>
        <sec id="sec-2-2-3">
          <title>2.2.3. Principal Component Analysis and Linear Discriminant Analysis</title>
          <p>One example of unsupervised learning is principal component analysis (PCA). PCA
is commonly used as a method to reduce the dimensionality of large data sets. The
tradeof for the reduction is accuracy, but the most significant data features are still
retained.</p>
          <p>
            The concept behind PCA is that PCA attempts to compress as much information
as possible in the first principal component (PC1), then the maximum remaining
information in the second (PC2), and so on. The number of principal components
depends on the number of input features [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ]. The construction of the first principal
component accounts for the largest possible variance in the data set. As shown below in
Figure 2(a), it is the line that goes through the origin, and it is the line in which the
projection of the points (red dots) is the most spread out.A second principal component
is calculated in the same way; however, it must be orthogonal to the first component,
and it must account for the next highest variance.
          </p>
          <p>On the other hand, Linear Discriminant Analysis (LDA) is a supervised technique
for dimensionality reduction that seeks to identify the linear combination of features
that best distinguishes the classes in a data set. The intent is to project data into
lower-dimensional space while keeping the information that is most relevant for class
discrimination.</p>
          <p>
            LDA works by finding a new axis that maximizes the distance between the mean values
of various classes while minimizing the spread of points within each class [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ]. However,
with LDA, these linear discriminants are aiming to separate classes as far apart as
possible, which is shown in Figure 2(b).
          </p>
          <p>(a)
(b)</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. METHODOLOGY</title>
      <sec id="sec-3-1">
        <title>3.1. Sensor selection</title>
        <p>
          A VOC detection focused on identifying VOCs like  -pinene, 3-carene and d-limonene
whose concentration in trees increases during periods of stress [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ][
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Other VOCs, such
as ethanol, 2-methyl and verbenol, were also subjects of study, as their presence could
indicate insect infestations in spruce trees, such as by bark beetles. Sensors, which are
mainly sensitive to alcohol, were selected to create a sensor array to detect these VOCs.
A list represented in Table 1 shows sensors used and the gases they are most sensitive
to. Sensors were integrated in sets of four or pairs for greater stability. All the sensors
are MOx based sensors due to their simplicity and cost efectiveness, but other types of
sensors could be applied, such as electrochemical or PID sensors.
To try to reduce the number of sensors, Random Forest was applied to create a feature
importance chart. The only sensor that stood out was GGS-2330, which has shown low
importance in substance and tree measurements, as seen in Figure 3.
        </p>
        <p>This indicates that taking GGS-2330 out would not afect the performance of e-nose in
detection of relevant VOCs. Another way to reduce the number of sensors would be
to use only one of each sensor instead of sets, but this might afect the stability of a system.
In addition to the sensors above, ENS160 and BME280 sensors for monitoring temperature,
humidity, and total VOC levels were implemented.Note that a Table 1 represents the
gases the sensors are most sensitive to, but there may be other gases that can afect the
sensitivity.</p>
        <p>(a)
(b)</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Experimental setup and measurement approach</title>
        <p>The experimental setup included two distinct odor measurement systems: one
for tree analysis and the other for substance detection. Figure 4(a) shows the
tree measurement setup, which includes two electronic noses: Smell Inspector by
SmartNanotubes and Digi-nose. Smell Inspector was used as a reference to guarantee
the accuracy of Digi-nose results. The design included push and pull pumps for air
circulation. Initially, the chamber was left empty for 15 minutes to create a baseline.
Following that, a tree was introduced, and its scents were investigated for 40 minutes.
Twelve trees were evaluated in total, divided into three categories: healthy, dry-stressed,
and overwatered.</p>
        <p>The substance measuring setup, depicted in Figure 4(b), had identical
components—pumps, a chamber, sensors, and a PC—but was intended to identify specific
substances. Following a 15-minute baseline air measurement, ethanol and d-limonene
were added, and measurements were conducted for 10 minutes.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Integrating Circuit Design, Data Acquisition, and Analysis</title>
        <p>The sensor array was composed of eighteen gas sensors, with the quantities of each
type listed in Table 1. Each sensor voltage is read in by Arduino Due and converted to
resistance value by voltage divider formula. Data of the same sensor type is averaged and
stored. For further processing, data is transmitted as a string. A data set is sent every
three seconds from Arduino to PC with a dimensions of 1x12 in form seen in Figure 5.
Data is collected and stored in a CSV file.
For analysis, the collection of data included measurements of  -pinene, 3-carene,
d-limonene, ethanol, 2-methyl, verbenol, air, and additionally, ethanol-verbenol solution
and mixture of all substances together. Each of these was measured 10-15 times,
equaling to around 120 measurements for data analysis. Measurement of trees led to 30
measurements, where 15 measurements were healthy trees and 15 measurements were
unhealthy trees.</p>
        <p>Since temperature, humidity, TVOC, and CO2, were not used in LDA, it was dropped,
leaving only data from MOx sensors for LDA analysis. Prior to LDA, data is split into
training and testing subsets, where the training set is normalized by MinMaxScaler.
This way, any data leakage was prevented. In this analysis, the training set consisted
of 80% of data, and the rest is used in the testing set. Data is split randomly each run.
For validation of the LDA result, accuracy is computed. Due to the balanced data set,
accuracy provides a reliable measure of model performance.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. RESULTS AND DISCUSSION</title>
      <p>A PCA algorithm provided a valuable insight into dimensionality reduction of data.
However, a separation of data has yielded results with high overlapping. Therefore, an
algorithm called LDA has been applied due to its ability to not only reduce dimensionality
but also to separate data into classes. Because of this, all further results will focus on
LDA.</p>
      <sec id="sec-4-1">
        <title>4.1. Digi-nose:</title>
        <p>Looking at Figure 6(a), one can notice quite the overlapping of sick and healthy
trees. The cause might be that some trees are not as sick as others or that healthy trees
are not as healthy. A training set contained 80% of the data and yielded an accuracy
score of 75%. The testing data set contained the rest of the data and has shown better
separation, with an accuracy score of 71%. A testing set is demonstrated in Figure 6(b).
(a)
(b)</p>
        <p>Worth noting is that the data set is small. Further testing is aimed at increasing the
data set for better and more eficient predictions.</p>
        <p>In the analysis of substance data, some of the substances have been able to be classified,
while the classification of others was challenging. Substances like d-limonene, ethanol,
verbanol, and air clearly separated, while 2-methyl, 3-carene,  -pinene and mixture
created overlapping. This problem occurs due to the nature of MOx sensors, where their
resistance can give the same results for diferent odors with diferent concentrations.
LDA analysis of substances is presented in Figure 7 and Figure 8. Similar to tree analysis,
80% of the data was used for training and 20% for testing set. Training set achieved 70%
accuracy score, while the testing set accuracy decreased to 65%.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Smell inspector:</title>
        <p>Data from trees and substances have been gathered in the same manner as with
Digi-nose, and LDA analysis has been applied. Analysis of tree data resulted in 88%
accuracy in the training set, while testing accuracy was very low, around 33%. This
resulted in overfitting, which may be caused by a small set of data. LDA analysis of
smell inspector data can be seen in Figure 9(a) and Figure 9(b).</p>
        <p>(a)
(b)</p>
        <p>Substance analysis gave better results than analysis of tree data. High accuracy of 96%
for the training set has shown great separability of substances, with slight overlap of
substances such as mixture,  -pinene, 2-methyl. Testing accuracy dropped slightly but
still remained at high 88%. LDA results are shown in Figure 10 and Figure 11.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. CONCLUSION</title>
      <p>In this project, an electronic nose using metal-oxide gas sensors to diferentiate
between healthy and sick trees by distinguishing unique volatile organic compounds
(VOCs) was successfully implemented. The e-nose system, together with an Arduino
Due microcontroller, further improved by Python data analysis, proved an efective way
for detecting and classifying VOCs related to forest health.</p>
      <p>Our methodology included developing a gas sensor array that would be capable
of detecting a broad range of diferent odors and providing information on how
healthy trees are. The procedure involved the application of PCA and LDA for
data analysis and the design of a graphical user interface for real-time monitoring.
Initial outcomes demonstrated the ability to show a diference between healthy and
ill trees with a reasonable level of accuracy. While the PCA provided initial
separation of data, the LDA provided clearer class separation, with overlapping in some cases.
Despite the success, an obstacle such as the MOx sensors’ limited selectivity for diferent
gases has shown a level of dificulty. A future study will focus on solving this problem
by implementing an artificial neural network to enhance e-noses’ selectivity for other gases.
In conclusion, e-nose represents an optimistic and cost-efective solution to more prevalent
approaches such as GC-MS for real-time monitoring of VOCs. This technique has the
potential to be applied not only for forest health monitoring, but also for agricultural
applications, contributing to environmental sustainability while making monitoring options
more accessible. Further improvements in sensor selectivity and machine learning
algorithms will be necessary to fully exploit the potential of this newly developed technology.</p>
    </sec>
    <sec id="sec-6">
      <title>6. OUTLOOK</title>
      <p>Future work shall focus on the development of a temperature compensation
algorithm that would utilize temperature data to adjust MOx sensors output data. This
would improve e-noses ability to operate in diferent environmental conditions.
While LDA has shown promising results, application of other algorithms, such as
Random Forest, would improve the problem of overfitting since it is less prone to it.
Another approach would be to increase a data set by more measurements or by data
augmentation (such as applying noise to the existing data).</p>
      <p>Since the data is balanced, accuracy has provided a reliable measure of performance.
Nevertheless, a system would benefit from additional metrics, such as the F1-score or
confusion matrix, which would ofer a more thorough evaluation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J. W.</given-names>
            <surname>Gardner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. C.</given-names>
            <surname>Persaud</surname>
          </string-name>
          ,
          <source>Electronic Noses and Olfaction 2000: Proceedings of the 7th International Symposium on Olfaction and Electronic Noses</source>
          , Brighton,
          <string-name>
            <surname>UK</surname>
          </string-name>
          ,
          <year>July 2000</year>
          , CRC Press,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.</given-names>
            <surname>Jaaniso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O. K.</given-names>
            <surname>Tan</surname>
          </string-name>
          , Semiconductor gas sensors,
          <source>Elsevier</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>C. M.</given-names>
            <surname>Bishop</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. M.</given-names>
            <surname>Nasrabadi</surname>
          </string-name>
          ,
          <article-title>Pattern recognition and machine learning</article-title>
          , volume
          <volume>4</volume>
          , Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Recent advances in the application of deep learning methods to forestry, Wood science</article-title>
          and technology
          <volume>55</volume>
          (
          <year>2021</year>
          )
          <fpage>1171</fpage>
          -
          <lpage>1202</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Antonelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Donelli</surname>
          </string-name>
          , G. Barbieri,
          <string-name>
            <given-names>M.</given-names>
            <surname>Valussi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Maggini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Firenzuoli</surname>
          </string-name>
          ,
          <article-title>Forest volatile organic compounds and their efects on human health: A state-of-the-art review</article-title>
          ,
          <source>International Journal of Environmental Research and Public Health</source>
          <volume>17</volume>
          (
          <year>2020</year>
          )
          <fpage>6506</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J. K.</given-names>
            <surname>Holopainen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gershenzon</surname>
          </string-name>
          ,
          <article-title>Multiple stress factors and the emission of plant vocs</article-title>
          ,
          <source>Trends in plant science 15</source>
          (
          <year>2010</year>
          )
          <fpage>176</fpage>
          -
          <lpage>184</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>