<!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>On statistical analysis and prediction of sap flow density for smart urban tree monitoring</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anastasia Safargalieva</string-name>
          <email>ansafargalieva@mail.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Irina Kochetkova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Elena Makeeva</string-name>
          <email>elena-makeeva-96@mail.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergey Shorgin</string-name>
          <email>sshorgin@ipiran.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Informatics Problems, Federal Research Center “Computer Sciences and Control” of the Russian Academy of</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Peoples' Friendship University of Russia (RUDN University)</institution>
          ,
          <addr-line>6 Miklukho-Maklaya St, Moscow, 117198, Russian</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Sciences</institution>
          ,
          <addr-line>44-2 Vavilova St, Moscow, 119333, Russian Federation</addr-line>
        </aff>
      </contrib-group>
      <fpage>64</fpage>
      <lpage>73</lpage>
      <abstract>
        <p>The use of IoT technologies in various areas of our life, including environmental monitoring of green spaces, is increasing every year. One such solution is the TreeTalker sensor-based monitoring system, which collects data on various parameters of trees. One of the most important parameters is the rate of tree sap flow. Predicting the density of sap flow and studying the relationship between the parameters of trees and the environment is an urgent task. In this work, a statistical analysis of the data collected using the TreeTalker monitoring system was carried out. The data was pre-processed: outliers in the data were removed using mean value replacement, z-score replacement and cumulative moving average replacement. Groups of trees that were homogeneous in time were identified, and regression models were built to predict the sap flow parameter using auto-regressive moving average and linear modeling. The results obtained can be used for further studies of the dependence of the state of the tree on external factors.</p>
      </abstract>
      <kwd-group>
        <kwd>prediction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Monitoring of the health of the trees helps to achieve a comprehensive view of ecosystems.
Nowadays environment is stressed by human activities. Providing a monitoring of trees health
can answer a lot of questions about the efectiveness of the measures to maintain ecosystem’s
health. TreeTalker(TT) is an IoT device that collects information about the health state of
the trees based on various internal and external factors. The main factor of the tree which is
considered the most important is sap flow [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>This work has the following structure: the section 2 is devoted to a primary statistical analysis,
work with the outliers in data with three methods: Mean Replacement, Z-score replacement
and Cumulative Mean Average. In section 3 we perform prediction of the sap flow using linear
models: auto-regressive moving average and linear regression.</p>
      <p>CEUR
Workshop
Proceedings
Workshop on information technology and scientific computing in the framework of the XI International Conference</p>
    </sec>
    <sec id="sec-2">
      <title>2. Initial Data Analysis</title>
      <sec id="sec-2-1">
        <title>2.1. Time Series Description</title>
        <p>
          TreeTalker sensors were installed on 195 trees in seven territories located in the center of
Moscow, on the RUDN University campus and in parks in the Moscow region. During 2019,
measurements were made of the parameters of 22 diferent tree species, diferent in age, as well
as in diferent states of ”health”. Every hour, data was collected on eight parameters – sap flow,
air temperature and humidity, negative pressure of water vapor in the leaves of a tree, angles of
tree deviations from the axis, wood moisture, temperature inside the trunk, and the normalized
relative vector of vegetation (NDVI) (Tab.1 and 2). Age group and VTA score are constants. For
the following work the data from the Troitsk Territory was selected.
time due to damage to the electronics after heavy rain (Fig. 1) and abnormally high-values (Fig.2).
The presence of gaps in measurements leads to false statistical analysis, as well as incorrect
modeling of dependencies. Therefore, the next task was to identify time-homogeneous groups
of data [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
2.2. Working with Unevenly Spaced Data
        </p>
        <p>
          The presence of time gaps, that Fig.1 showed, makes it impossible to build models. The set
of time values  = { 1,  2, ...,   } consists of time-homogeneous subgroups   = {  , 

selected according to the algorithm [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. For our model, we will consider as homogeneous data
those values, the diference in arrival between which is 1 hour (Alg. 1).
0.01 – 5.9
10-27
        </p>
        <p>Data:  = { 1,  2, ...,   } - set of time values
Result:   = {  ,</p>
        <p>for  = 1, 2, ... do</p>
        <p>+ } - time-homogeneous subgroups
else
end
end
if [ + 1] − [] &gt; 1</p>
        <p>then
put [ + 1] in the new group;</p>
        <sec id="sec-2-1-1">
          <title>Leave [ + 1] in the same group</title>
        </sec>
        <sec id="sec-2-1-2">
          <title>Algorithm 1: Algorithm to reveal time-homogeneous data</title>
        </sec>
        <sec id="sec-2-1-3">
          <title>After data selection we get homogeneous data regarding flux parameter (Fig.</title>
        </sec>
        <sec id="sec-2-1-4">
          <title>3 ). The graph of the dependence of sap flow on time within a homogeneous group showed the presence of abnormally high values of sap flow (Fig. 4).</title>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>2.3. Working with Outliers</title>
        <p>Mean Replacement Method. The first way to work with outliers in your data is to replace
outliers with mean values.   – source row of one of eight parameters.   – row after processing
from outliers after applying the following algorithm:</p>
        <p>
          1
The results of the replacement of outliers with mean values can be seen on Fig.5. From
(1)
(2)
the graph it is clear that the values are no more than 5 points of the sup tree flux units of
measurement.
analysis of values using  – estimation and subsequent processing of abnormally high values
of the parameter [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. For the  – estimate, calculate the mean  ̄ and standard deviation  
calculated for the set of processed data
(3)
(4)
(5)
(6)
  =
        </p>
        <p>1
√  − 1 =1</p>
        <p>∑(  −  ) ̄ 2
 =</p>
        <p>,
if   ≤ 
if   &gt; 



curves is diferent.
period:</p>
        <p>The results of the replacement of outliers with mean values can be seen on Fig.6. From
the graph it is clear that the values are no more than 5 points of the sup tree flux units of
measurement as it was with the mean replacement method. However, the structure of the</p>
        <p>
          Cumulative Moving Average Method. The third method used to deal with outliers in this
work is the cumulative moving average method. It is used for smoothing time series [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. This
method smooths outliers using the arithmetic mean of the original function   over the entire

where   is a new series smoothed using the cumulative moving average at the moment  (Fig.7),
 is the number of intervals available for calculation,   - the value of the original function
at points. After using three methods mentioned above, we selected the data processed with
z-score (Fig.6) as this method provides the better structure of the data - smooths it, the box-plots
showed no outliers in the data.
        </p>
        <p>The methods of working with outliers are presented in the form of the algorithm (Alg.2).
3. Sap Flow Density Prediction</p>
      </sec>
      <sec id="sec-2-3">
        <title>3.1. Preliminary Considerations</title>
        <p>
          The construction of a mathematical model of sap flow and prediction of sap flow will help
to find out whether there is really a direct relationship between the sap flow and the air
temperature, whether other factors afect the sap flow parameter. To analyze the obtained
dependencies, 4 parameters for assessing the quality of the models were investigated:  2,  –
statistics, root-mean-square error (RMSE) and mean absolute error (MAE) [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-4">
        <title>3.2. ARMA Model</title>
        <p>The ARMA model is an auto-regressive moving average model. The formula is as follows:
  = 1.4220 + 0.7150  + 1.39 + 0.134,
(7)
where  = 0.7150 is the parameter of the model,  is the parameter of the regression model,
 = 1.39 is the coeficient of the moving average,  is the parameter of the moving average,
 = 1.4240 is a constant. The graph of the sup flow prognostication shows deceleration of the
lfow (Fig. 8).
Data:   - original series,  ̄ - mean value of original series,  - z-score of original series
Result:   - processed series
Case 1: Mean-value Replacement
for  = 1, 2, ... do
if [] &gt;  ̄ then
 [] =  ;̄
 [] = []
else
end
else
end
if [] &gt;</p>
        <p>then
 [] =  ;
 [] = []
end
Case 2: Z-score Replacement
for  = 1, 2, ... do
end
Case 3: Cumulative Moving Average
for  = 1, 2, ... do</p>
        <p>end
end
for  = 1, 2, ... do
 [] =</p>
        <p>∑=1 []</p>
        <p />
        <sec id="sec-2-4-1">
          <title>Algorithm 2: Algorithm of Replacement of Outliers</title>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>3.3. Linear Regression</title>
        <p>
          We will forecast 25 observations ahead. We will draw the plot of the result, which turned
out as a result of applying the linear regression model (Fig.9) [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. Simulation of sap flow with
diferent combinations of factors made it possible to identify the most efective models for
describing the dependence of the tree sap flow. In the equation of the dependence of aspen sap
lfow on the territory of the Trotsk green spaces the parameter of negative pressure of water
vapor in the leaves of the tree has the greatest influence:
  = 0.78 + 1.0538  + 0.3458 ℎ − 4.7587  −
− 0.1761  ℎ − 0.8449 1 + 1.4893  − 0.1945 
(8)
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4. Conclusion</title>
      <p>It was found in the work that the negative pressure of water vapor in the leaves is significantly
correlated with the parameter of tree sap flow. After analyzing the data, it was found that the
sap flow of trees depends on 7 factors. The results obtained during the work showed which
parameters should be taken into account when analyzing the state of the tree and predicting
time-dependent factors. This study will provide a starting point for more sophisticated modeling
approaches. For example, predicting a model using Fourier series can provide more accurate
parameter estimates. In addition, assessing the flow density of sap flow is the main goal of
researching the health of green spaces to predict changes in their health status.</p>
      <p>The authors grateful to Dr. Alexey Yaroslavtsev (RUDN University) for providing the dataset
from TreeTalker system.</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgments</title>
      <p>The work was supported by the Russian Science Foundation, project 19-77-30012 (recipient
Irina Kochetkova). This paper has been supported by the RUDN University Strategic Academic</p>
      <sec id="sec-4-1">
        <title>Leadership Program (recipient Elena Makeeva).</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>V.</given-names>
            <surname>Matasov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. B.</given-names>
            <surname>Marchesini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Yaroslavtsev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Sala</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Fareeva</surname>
          </string-name>
          , I. Seregin,
          <string-name>
            <given-names>S.</given-names>
            <surname>Castaldi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vasenev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Valentini</surname>
          </string-name>
          ,
          <article-title>Iot monitoring of urban tree ecosystem services: Possibilities and challenges</article-title>
          ,
          <source>Forests</source>
          <volume>11</volume>
          (
          <year>2020</year>
          ). doi:
          <volume>10</volume>
          .3390/f11070775.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V.</given-names>
            <surname>Riccardo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. L.</given-names>
            <surname>Marchesini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Giovanna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Yaroslavtsev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vasenev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Castaldi</surname>
          </string-name>
          ,
          <article-title>New tree monitoring systems: from industry 4.0 to nature 4.0 (</article-title>
          <year>2019</year>
          ). doi:
          <volume>10</volume>
          .12899/asr- 1847.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Fidino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Magle</surname>
          </string-name>
          ,
          <article-title>Using fourier series to estimate periodic patterns in dynamic occupancy models</article-title>
          ,
          <source>Ecosphere</source>
          <volume>8</volume>
          (
          <year>2017</year>
          ). doi:
          <volume>10</volume>
          .1002/ecs2.
          <year>1944</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Efrosinin</surname>
          </string-name>
          , I. Kochetkova,
          <string-name>
            <given-names>N.</given-names>
            <surname>Stepanova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Yarovslavtsev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Samouylov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Valentini</surname>
          </string-name>
          ,
          <article-title>The fourier series model for predicting sapflow density flux based on treetalker monitoring system</article-title>
          ,
          <source>Lecture Notes in Computer Science 12526 LNCS</source>
          (
          <year>2020</year>
          )
          <fpage>198</fpage>
          -
          <lpage>209</lpage>
          . doi:
          <volume>10</volume>
          .1007/ 978- 3-
          <fpage>030</fpage>
          - 65729- 1_
          <fpage>18</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Efrosinin</surname>
          </string-name>
          , I. Kochetkova,
          <string-name>
            <given-names>N.</given-names>
            <surname>Stepanova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Yarovslavtsev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Samouylov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Valentini</surname>
          </string-name>
          ,
          <article-title>Trees classification based on fourier coeficients of the sapflow density flux</article-title>
          ,
          <source>Annales Mathematicae et Informaticae</source>
          <volume>53</volume>
          (
          <year>2021</year>
          )
          <fpage>109</fpage>
          -
          <lpage>123</lpage>
          . doi:
          <volume>10</volume>
          .33039/ami.
          <year>2021</year>
          .
          <volume>03</volume>
          .002.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Box</surname>
          </string-name>
          , G. Reinsel, G. Ljung,
          <source>Time Series Analysis: Forecasting and Control</source>
          , volume
          <volume>68</volume>
          ,
          <year>2016</year>
          . doi:
          <volume>10</volume>
          .2307/2284112.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>W.</given-names>
            <surname>McKinney</surname>
          </string-name>
          ,
          <article-title>Python for Data Analysis: Data Wrangling with Pandas, NumPy, and</article-title>
          <string-name>
            <surname>IPython</surname>
          </string-name>
          ,
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          , Inc, Massachusetts,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Granier</surname>
          </string-name>
          ,
          <article-title>A new method of sap flow measurement in tree stems</article-title>
          ,
          <source>Annales Des Sciences Forestieres</source>
          <volume>42</volume>
          (
          <year>1985</year>
          )
          <fpage>193</fpage>
          -
          <lpage>200</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Rice</surname>
          </string-name>
          ,
          <source>Mathematical Statistics and Data Analysis, Duxbury Original Series</source>
          , Massachusetts,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>