<!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>Creation of Applied Software and Methodical Support of a Wireless Sensor Network for Agriculture</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Glushkov` Institute of Cybernetics of NAS of Ukraine</institution>
          ,
          <addr-line>prospect Akademika Glushkova, 40, Kyiv, 03187</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The article describes applied software of main components of such complex hardwaresoftware system, as plants` state monitoring system for application in agriculture and ecological monitoring. The mentioned system consists of data acquisition system in the form of wireless sensor network and adaptive part in the form of decision-making support system. The authors described main applied software of autonomous nodes of wireless sensor network and implementation of some program functions of decision-making support system. Developed wireless sensor network includes many autonomous wireless sensors, so the main criteria during applied software creation was assuring the energy efficiency of operation of autonomous measuring nodes and network coordinator, and correct interaction of nodes within all network. As it is very difficult to perform testing of applied software of wireless nodes individually in field conditions, it was tested the network cluster, including hardware and software as a whole, in conditions like to applied task. The main parameters, which define the correctness of applied software operation, were estimated. These parameters include, for example, time of network self-organization, distance and quality of stable communication, time of autonomous operation of wireless nodes without charging of batteries and so on. To create applied software for the decision-making support system, first of all, methods of plants` state diagnosing and estimating the factors, which influence the plant state, were developed. For this, the field experiments were conducted to determine sufficient dose of herbicide application and estimate the soil moisture using the chlorophyll fluorescence induction method. For processing measured data, several methods of machine learning were used, including neural network approach. Application of machine learning methods made it possible, on the base of acquired data, to make early diagnostics of influence of stress factors on the plant even before the appearance of visual manifestations of such negative influence and determine the decrease of soil moisture through the diagnostics of plant itself, and inform the user about this.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Wireless sensor network</kwd>
        <kwd>decision-making support system</kwd>
        <kwd>applied software</kwd>
        <kwd>plants` state monitoring system</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The speed and the accuracy of decision making in ecological monitoring, precision or digital
agriculture are determined usually by amount, quality and frequency of acquiring of measuring data
from monitored territories or objects and by the speed of data processing. A set of mobile and
traditional data acquisition technologies, databases and software for preliminary data processing can
be called as a base system for decision-making support. The next component, main purpose of which
is generation and optimization of the made managerial decision and further actions, can be called as
adaptive unit. Data, which are acquired directly from monitored territories or objects, include
meteorological data, information about soils` state and, no less important, information about plants`
state.</p>
      <p>Therefore, the acquisition of operative and objective information about the state of plant cover in
many cases is an important factor, which causes the further strategy of keeping agricultural lands,
greenery of megalopolises, national plant reserves, woodlands and parklands and making the proper
optimal decision. Certainly, it would be ideal to acquire information about the impairment or
improvement of state of plants beforehand, but not long time after the event. It will allow to save
plants from possible losses, reduce the costs for their protection, and decrease the negative impact of
stress factors of natural or anthropogenic origin on plants.</p>
      <p>It should be noted, that mobile and traditional data acquisition systems play an important role both
in precision and digital agriculture, and in ecological monitoring and environmental protection.
Currently, during the fast development of wireless technologies and Internet of Things, it is
reasonable as mobile data acquisition system to use the wireless sensor networks, the devices of
Internet of Things or Industrial Internet of Things in combination with wireless technologies of long
distance communication.</p>
      <p>
        Now many projects, concerning the application of wireless sensor networks in the various areas of
human activity, have already been completed and implemented or are under the researches and
development. There are some projects and system, in which wireless sensor network are used for data
acquisition in digital agriculture or ecological monitoring. Swiss commercial system "Predicting
Diseases of Vine (PreDiVine)" [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is intended to fight against pests of vine. Wireless sensors are
allocated on buds and stems of the vine for measuring air temperature. Sensors transmit the data via
wireless channel to computer device, which models the evolution of pest on the base of temperature
data. Hungarian company "AgroSense" [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] developed wireless sensor network for agricultural sector.
Network collects data of soil temperature, and humidity, leaf wetness and thus controls the watering.
In work [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] the wireless sensor network are used to collect environments parameters to protect plants
from frosts. Paper [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] describes a successful solution for ecological monitoring, where a wireless
sensor network is implemented and used to monitor state of plants and trees, which can operate as in
field conditions, so in indoor conditions. It should be noted that there are many similar projects with
almost similar functionality and use hardware-software tools.
      </p>
      <p>
        We want to point, that in all mentioned projects, technologies and examined papers proposed
systems for measuring different parameters of soil, plants and environment including temperature,
humidity, biochemical parameters of plants, even sound range etc. But any system does not measure
parameters of photosynthesis – the main process of plant vital activity. If it is necessary to estimate
plants state and influence of stress factors of natural or anthropogenic origin on them, the most
effective and informative way for accurate estimating of plant state is to measure the photosynthesis
parameters in plants [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Data acquisition system implementation</title>
      <p>Modern achievements in microelectronics, biosensor technologies, and information and
communication technologies make it possible to develop and create wireless sensor networks for
express-diagnostics of plants` state on large territories using an effect of chlorophyll fluorescence
induction. Moreover, the integration the miniature sensors into wireless sensor networks to measure
additional parameters of state of air and soil make it possible to diagnose not only the general state of
plants, but also such parameters, as herbicides content in soil, water and plants, level of soil corrosion,
air pollution and so on.</p>
      <p>The elements of proposed data acquisition systems are wireless sensor networks or their clusters.
The cover area of such network can varies from several square metres to several square kilometres
due to possibility to transfer measured data from one network node to another. The main advantage of
wireless sensor network is ability to real-time monitor the state of agricultural plants or environmental
parameters on large territories. Figure 1 shows the structure of proposed data acquisition system for
agriculture or ecological monitoring.</p>
      <p>Acquiring data about state of monitored objects is made with wireless sensors, which are
combined into wireless sensor network. In this case, the defined territory can be covered as by
separate wireless network, so the cluster of such network. Of course, a certain number of measuring
nodes can be equipped with wired data transfer channels and connected to single wireless node, which
will aggregate the acquired measured data and transfer them to the next network node. There are two
types of wireless measuring nodes. The first ones are intended to measure the state of alive plant by
measuring the chlorophyll fluorescence induction, the second ones – to measure the parameters of soil
and air. Measured data are transmitted through signal repeaters to the network coordinator, which
aggregates measured data from different measuring nodes and send them to the server. The special
software module for preliminary data processing is on the server side. The main purpose of this
module is preparing data for making managerial decision or measured data visualization.</p>
      <p>The set of measuring tools and server with software module for preliminary data processing and
data visualization is the basic part of system, which is intended to acquaint users with state of
monitored territories or objects in real time mode. Software unit of generation and optimization of
managerial decision refers to adaptive part of the system, the main purpose of which is to help user in
keeping and caring the monitored territories or objects and making the managerial decision to
minimize the impact of negative factors of natural or anthropogenic origin.</p>
      <p>Depending of applied task, the user can deploy basic configuration of data acquisition system or
full system with adaptive part. At basic configuration, the user receives only information about state
of monitored territory or objects in visual mode and then the user itself makes the managerial decision
about further actions. When deploying the full system with adaptive part, the user receives not only
the information about state of monitored territories and objects, but also gets managerial decision or
recommendations about further actions, produced by the adaptive part of system.</p>
      <p>The feature of proposed system is that the individual wireless sensor network can cover the
territories of different areas, so they have to be very well scalable. Scalability causes the presence
some number of signal repeaters and proper network self-organization algorithms in the network. In
addition, the networks can be located on different distances from server, as well as each from other.
Such preconditions of deployment of networks and systems in whole make it reasonable to use a
several protocols of different effective distance to transfer data. To organize the communication
between nodes of separate networks it is reasonable to use industrial wireless communication
protocols or technologies of Industrial Internet of Things, for example, ZigBee or Bluetooth Mesh. To
organize the communication between the separate networks and server, it is advisable, if it is
necessary, to use technologies of long-distance communication, for example, 4G LTE.</p>
      <p>Wireless microcontroller of nRF52840 type were used to create wireless measuring nodes, signal
repeaters, control nodes and network coordinators. The generalized structural diagram of the wireless
communication module on the base of system-on-chip nRF52840 with main interfaces, implemented
for our applied task, is shown on Figure 2.</p>
      <p>Connection of different interfaces make it possible to create different network nodes. The
measuring node provides the connection of wired channel UART and wireless channel ZigBee or
Bluetooth. The network coordinator provides the connection of wireless channel ZigBee or Bluetooth
and additional units, including display, memory and control elements. In addition, in some applied
tasks the coordinator may need the connection via wired channel with PC. The next network unit is
control node, which gives possibility to connect measuring nodes directly to a PC. The control node
provides the connection of wireless channel ZigBee or Bluetooth and wired channel USBD for
connecting to a PC. Some of developed wireless nodes are shown on Figures: wireless measuring
node (Figure 3), network coordinator (Figure 4) and control node (Figure 5).</p>
      <p>The proposed network elements, – measuring node, control node and network coordinator, – make
it possible to build several network topologies on the principle of pico-network (Figure 6). It should
be noted, that for some applied tasks the network coordinator can be replaced by a smartphone or
tablet computer with special applied software, which fully implements the functions of network
coordinator. The control node can operate only in combination with a PC or, as an option, a laptop.
Therefore, the main purpose of control node is to connect ZigBee- or Bluetooth-network to PC or
laptop.</p>
      <p>Network self-organizing and operating are based on the principles, which give the possibility to
create flexible topologies of network at some upgrading of hardware and software of wireless nodes.
Using the stack of wireless protocol of industrial type, e.g. ZigBee, will give the possibility to build
industrial wireless sensor networks without the replacing the hardware and with ability to integrate
such networks in other industrial systems of automation, control and measurement. Replacing the
ZigBee industrial protocol with Bluetooth 5 or Bluetooth Mesh protocol stack will give the possibility
to build wireless sensor networks on the principles of Internet of things technology. Using the
protocol of long-distance range, e.g. LTE or EDGE, will give possibility to connect the wireless
network to remote central server, other remote system or cloud environment.</p>
      <p>A small reconfiguration of interfaces of wireless nodes will make it possible to create flexible
topologies of wireless sensor networks, which will be able to satisfy requirements of majority applied
tasks in industry, medicine, ecology or scientific researches. Figure 7 shows the example of such
complicated network topology.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Implementation of applied software of network nodes</title>
      <p>Mentioned above network nodes usually can be adapted to different applied tasks through small
update of applied software and reconfiguration of interfaces of wireless nodes. At the same time, the
hardware does not need any changes or upgrades, with the exception of rechargeable batteries or
memory modules. Each of proposed wireless nodes has a certain functional purpose, for the
implementation of functions of which the appropriate applied software have been created.</p>
      <p>The network coordinator is intended for network organization, connection of measuring nodes,
visualization data about network, measuring nodes or measured data, and, if it is necessary,
connection to a PC for data transferring. The network coordinator works independently and the
presence of PC is not mandatory. The main functions of network coordinator, which are implemented
through appropriate applied software or program services, are the next:
 Organization of wireless connections with individual measuring nodes;
 Formation of wireless sensor network and control of its topology;
 Setting and configuration of network parameters, setting and maintenance of network politic;
 Setting the criteria of connections of wireless measuring nodes;
 Control the measurements in whole network or individual measuring nodes;
 Storage of the measured data from all measuring nodes;
 Measured data processing and aggregation;
 Visualization of information about whole network or individual measuring nodes;
 Visualization of measured data;
 Establishing a connection with PC to transfer data or receive settings.</p>
      <p>The main purpose of wireless measuring node is to measure by the sensor, connected via UART
interface, in our case. The main functions of measuring node, which are implemented through
appropriate applied software or program services, are the next:
 Connection to random or predetermined wireless sensor network;
 Conducting measurements according to previously set program or mode;
 Preliminary processing of measured data;
 Storage of certain number of measurements;
 Data transferring to network coordinator, mobile device or via control node to a PC.</p>
      <p>Control node is intended to organize the wireless network, connect the measuring nodes and
establish the connection of wireless network with PC or laptop. The main functions of control node,
which are implemented through appropriate applied software or program services, are the next:
 Organization of wireless connections with individual measuring nodes;
 Formation of wireless sensor network and control of its topology;
 Setting and configuration of network parameters, setting and maintenance of network politic;
 Setting the criteria of connections of wireless measuring nodes;
 Establishing the transit data channel to transfer data from network nodes to a PC;
 Transfer of control commands from PC to all wireless measuring nodes or selected one;
 Transfer of measured data from measuring nodes to a PC.</p>
      <p>Different applied software has been created for network coordinator, measuring node and control
node, so their operating algorithms slightly differ. After switching on, the network coordinator reads
the parameters of network and interfaces from internal memory or these parameters can be entered by
user via proper control units. Then, timers and counters, internal interfaces (SPI, UART, USBD, etc.),
control units (buttons, switchers etc.) and display elements (indicators, LCD display etc.) are
initialized and started according to received parameters. Then the selected power profile is configured
and started. The last preparatory stage is initializing and starting the ZigBee or Bluetooth protocol
stack, proper attendant services and filters of possible connections. Then it is started the process of
scanning the radio-air and searching the potential nodes to connect according to predefined filters. In
parallel, the working mode of the coordinator starts, in which the program module for analysis and
processing the events and interrupts also begins to work. The module for scanning and searching the
potential nodes determines whether the maximum number of connections has been reached and, if
not, it connects the found node to the network. Such operation is repeated until the maximum number
of connections is reached. In this case, the module for scanning and searching the potential nodes
stops its operating. If during the working cycle any node disconnects from the network, then the
module for scanning and searching the potential nodes starts operating to connect new found nodes to
network until the maximum number of connections is reached. The generalized structure of applied
software of the network coordinator is shown on the Figure 8.</p>
      <p>During the work cycle of the network coordinator, the module for analysis and processing of
events and interruptions is constantly running. As soon as event or interruption is detected, the event
handler is run to determine the type of event or interruption. If the event or interruption relates to
stopping operation of coordinator, disconnecting of connected nodes, data processing or data
transferring, then the proper software module of handler is started. If the command to stop the
coordinator operation is received, then the coordinator stops its software and hardware modules in
regular mode and, only after that, the power of coordinator itself is switched off. If the event of node
disconnecting is detected, then the module for scanning and searching the potential nodes starts
operating and connects the new potential nodes. If the event of input data presence is detected, then
the analysing packet module is started to analyse the format of message and determine the content of
data packet. If data packet includes measured data, such data is preliminary processed and stored in
internal memory. If data packet includes command or service data, then the analysing packet module
launches proper software module.</p>
      <p>After switching on, the measuring node reads the parameters of connection to network and
operational mode from internal memory. Then, timers and counters, internal interfaces (UART, etc.),
control units (buttons, switchers etc.) and display elements (indicators, etc.) are initialized and started
according to read parameters. Then the selected power profile is configured and started. The last
preparatory stage is initializing and starting the ZigBee or Bluetooth protocol stack and proper
attendant services. Then it is started the searching of the main network device to connect accordingly
to the read connection parameters. After connection to the main network device, it is started the
working cycle of measuring node. The generalized structure of applied software of the measuring
node is shown on the Figure 9.</p>
      <p>During the work cycle of the measuring node, the module for analysis and processing of events
and interruptions is constantly running. As soon as event or interruption is detected, the event handler
is run to determine the type of event or interruption. If the event or interruption relates to stopping
operation of measuring node, starting the measurement or input data processing, then the proper
software module of handler is started. If the command to stop the measuring node operation is
received, then the measuring node stops its software and hardware modules in regular mode and, only
after that, the power of node itself is switched off. If the command to start measurement is received,
then the proper software module conducts measurement accordingly to selected mode, and measured
data are stored in internal memory or transferred to main network device. If the event of input data
presence is detected, then the analysing packet module is started to analyse the format of message and
determine the content of data packet. If data packet includes command or service data, then the
analysing packet module launches one of software modules accordingly to type of command or
service data. If data packet includes measured data from sensor interface, then it is started the
software module for processing the measured data, which makes decision to store them in internal
memory or transfer to main network device accordingly to actual operational parameters.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Interaction of applied software of network nodes</title>
      <p>Applied software was developed for every network node, which interact with each other via
special software interfaces and services during the network operation. The scheme of interaction of
applied software of wireless nodes in the network on the base of network coordinator is shown on
Figure 10, on the base of control node is shown on Figure 11.</p>
      <p>When network is organized on the base of network coordinator, the presence of PC is optional.
Applied software of network coordinator plays the main role in network organizing, maintaining its
operation and controlling both the network in whole and individual wireless nodes. Data processing
and storing also completely depend on applied software of network coordinator. PC in such scheme
serves only as additional tool for storage and visualization of measured data.</p>
      <p>When network is organized on the base of control node, the applied software of network
coordinator only organizes the network and maintains its operation. In such scheme, the applied
software of control node plays the main role and controls all the measuring nodes, gives command to
conduct measurements, processes, stores and visualizes the measured data. At the same time, the
applied software of network coordinator switches to “tunnel” mode, at which it only transfers
commands directly from PC to nodes and measured data in reverse direction.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Implementation of functions of applied software for generation and optimization of managerial decisions</title>
      <p>As mentioned above, the user can deploy the system for agriculture monitoring both with adaptive
module and without it. In the first case, the user will receive some managerial decisions depending on
acquired measured data. In the second case, the user will need to make some decisions itself on the
base of information about plants` state on certain territory or territories, presented in text, table or
graphic form.</p>
      <p>
        In order to make managerial decisions, a number of applied methods of diagnostics of plant state
already have been developed in the world with using the machine learning methods to process the
measurements of chlorophyll fluorescence induction. Among them, it is possible to note out the
forecasting state of ornamental plants depending the environmental conditions and changes in the
chlorophyll fluorescence induction [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], taxonomic distinction of plants by chlorophyll fluorescence
curves [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], determination of water deficit [
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ], determination of stress source [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], determination of
plant maturity [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and etc.
      </p>
      <p>For adaptive part, that is decision-making support system, the authors have developed the applied
method for determination of sufficient dose of herbicide application using the chlorophyll
fluorescence induction. For the purpose the proper experiment was conducted, in which the plant
objects were divided into three groups (control – without herbicide application, and other two groups
with application of different doses of herbicide). The collected data were used to study the
possibilities of different machine learning algorithms to classify plants into proper groups on different
days of experiment.</p>
      <p>
        The neural network approach used the two-layer neural network with sigmoid function of
activation (hyperbolic tangent) and normalized exponential (softmax) function on the output layer of
neurons. The used neural network showed, that already on the seventh day after herbicide application
of plants, it could learn to recognize the plants of different groups. The normalization of the curve
made it possible to improve the result, what eliminated some differences between curves, measured
by different sensors. The best result was shown by the minimax normalization within range [
        <xref ref-type="bibr" rid="ref1">–1, 1</xref>
        ] (1)
and the centralization of the value around the average (z–score) (2):
xik  F0,k (1)
(2)
~xik  2
      </p>
      <p> 1 ,</p>
      <p>Fm,k  F0,k
~
xik 
xik  x k ,</p>
      <p> xk
where хik – matrix element in i row, k column; ~хik – normalized fluorescence value in i row, k
column; хk – average value of k column;  хk – standard deviation of chlorophyll fluorescence
induction values in k column;. Fm,k – maximum value in k column, F0,k – minimum fluorescence
value in k column.</p>
      <p>The application of these methods of normalization made it possible to improve the average
accuracy of recognition by neural network of groups of plants, treated with herbicide, on the seventh
day after herbicide application from 66,7 % to 80,9 %. Neural networks provide an early
determination of influence of stress factor on plant state even before appearance of visual signs on the
plant. They showed good results on the seventh day after herbicide application, while the visual signs
of the herbicide influence only appear on the plants on the twelfth–fourteenths days.</p>
      <p>Further, the mentioned set of data was tested using the method of support vectors (Support Vector
Machine). Such kernel functions (kernels) as linear, polynomial, radial basis function and sigmoid
were tested. The best result was demonstrated by polynomial kernel.</p>
      <p>As with neural networks, during using the support vector method on different days after herbicide
application, this method began to recognize well the difference between the experimental groups
already on the seventh day after herbicide application. Support vector method showed better result
than used neural network. Already on the seventh day after herbicide application, the maximum
accuracy of recognition by the support vector method was almost 1,0 (100%), while the used neural
network provided only a maximum accuracy of 0,8.</p>
      <p>In addition, the algorithm XGBoost (Extreme Gradient Boosting) was used on the mentioned data
set – the popular machine-learning algorithm, which implements the gradient boosting model and is
an alternative to regression methods and neural networks. This method creates a set of successively
clarifying each other decision trees. The N-model of tree is trained on the “errors” of set of n–1
models, and answers of models are weighted and summed. The implementation of the XGBClassifier
algorithm in python language from the scikit-learn library was used. The XGBClassifier algorithm
was used for the task to recognize the influence of herbicide on different days after herbicide
application without data normalization (Table 1). A thousand tests were conducted with different
dividing into test and training samples. 30 % of measured data of chlorophyll fluorescence induction
were assigned to training sample. The algorithm shown the best results on classification on eleventh
day after herbicide application.</p>
      <sec id="sec-5-1">
        <title>Before herbicide application</title>
        <p>Before herbicide application</p>
      </sec>
      <sec id="sec-5-2">
        <title>3 days after herbicide application</title>
      </sec>
      <sec id="sec-5-3">
        <title>5 days after herbicide application</title>
      </sec>
      <sec id="sec-5-4">
        <title>7 days after herbicide application 11 days after herbicide application 13 days after herbicide application 20 days after herbicide application</title>
      </sec>
      <sec id="sec-5-5">
        <title>Time of measurement</title>
      </sec>
      <sec id="sec-5-6">
        <title>Before herbicide application</title>
        <p>Before herbicide application</p>
      </sec>
      <sec id="sec-5-7">
        <title>3 days after herbicide application</title>
      </sec>
      <sec id="sec-5-8">
        <title>5 days after herbicide application</title>
      </sec>
      <sec id="sec-5-9">
        <title>7 days after herbicide application 11 days after herbicide application 13 days after herbicide application 20 days after herbicide application</title>
        <p>Table 2 shows the results, obtained by XGBClassifier algorithm, but with using of minimax
normalization (1). So, after minimax normalization of measured curves, the XGBClassifier algorithm
was able to recognize the measured curves with 100% accuracy on the seventh, eleventh and
thirteenth days after herbicide application. On the twentieth day after herbicide application, the
accuracy of recognition of XGBClassifier algorithm worsened.</p>
        <p>The method to determine the soil humidity using the chlorophyll fluorescence induction was
developed to help an agronomist to determine the need for watering plants. For several weeks the
chlorophyll fluorescence induction of plants were measured, part of which was watered constantly,
and the other part was not watered. Machine learning algorithms had to determine the humidity level
(regression task) by the curves of chlorophyll fluorescence induction. As in the previous experiment, a
neural network, a support vector method and XGBoost algorithm were used.</p>
        <p>The used neural network contained three layers of neurons with a sigmoid activation function in
the hidden layers and a linear activation function of neurons in the output layer. One of the results of
regression of the neural network is shown on Figure 12.</p>
        <p>The best result, obtained by the mentioned neural network, was R=0,81. The usage of support
vector method shown, that the best result was demonstrated by polynomial kernel of the forth degree
with using of minimax normalization of data. It was tested the possibility to give the different number
of discretely measured points of curve of chlorophyll fluorescence induction from 10 to maximum 90,
which are measured by sensors and taken nonlinear by a power scale (degree 1/8). The best result was
obtained when using 70 points. The usage of XGBoost algorithm shown, that the best results were
obtained with using normalization of data by z-score (2). The regression is conducted with enough
high result even when taking discretely 10 points of curve of chlorophyll fluorescence induction by
power scale. The results of all three machine-learning algorithms (regression coefficient and
correlation coefficient) are shown in the Table 3.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Testing the correctness of operation of applied software of network nodes</title>
      <p>Acquisition of reliable measured data and making the proper managerial decisions depend on
reliability and stability of operation of measuring nodes, data transfer channels and proper applied
software, which controls their work.</p>
      <p>Reliable operation of the network and data transferring require taking into account several
principles both during network development and during network prototype testing:
 Reliable operation of hardware and software of wireless nodes, that make it impossible or
unlikely the failures of main nodes of network, which organize main paths of data transferring;
 Using the effective protocols of routing and data transferring, which form the optimal paths of
data transferring with low probability of data losses, for example, only through the channels with
high communication quality;
 Using of data transferring mechanisms, which ensure guaranteed delivery of data packets no
so much due to organizing the reliable data transferring channel, but primarily due to multiply
retranslation of data packet in the case of absence of acknowledgment from receiver about the data
packet obtaining;
 Using of algorithms of network self-organizing, which quickly form new topology of wireless
sensor network in the case of failure of separate wireless nodes.</p>
      <p>Since, in our applied task the measurements are made by autonomous measuring nodes, which
organize into a wireless sensor network, so the correctness of operation of applied software greatly
influences energy efficiency of autonomous nodes in whole. If the applied software and data transfer
protocols are developed and configured incorrectly, then network nodes will quickly discharge, which
make it impossible for such wireless network to fulfil its target task – measurement and acquisition of
measured data from certain territory of agricultural lands during a certain time with a purpose to make
proper managerial decision to help the user.</p>
      <p>That is why the testing of the operation of such network in combination of its hardware and
software in field conditions plays an important role for further scaling of such network and its
implementation in real applications. Since the deployment of the whole network for testing in field
conditions is a rather long and expensive process, as a rule, only a cluster of such network is tested,
what makes it possible to discover weaknesses and miscalculations in development both applied
software and hardware.</p>
      <p>The proposed network is intended for needs of digital agriculture for usage on the large territories
of agricultural lands. The purpose of the network defines its characteristics, which are very important
during testing. They include protection from climatic conditions, duration of autonomous operation
without replacing the power elements and conducting maintenance, high reliability of operation, low
power consumption, sufficient range of wireless data transmission.</p>
      <p>The main parameters, which determine the correctness of applied software operation and have to
be evaluated during testing, are:
1. The time of self-organization – time, which is needed to connect to network all nodes.
2. The range of communication – the distance, at which there is a stable connection between
nodes.
3. The quality of communication – refers to the ratio of successfully received messages by a
node to the total number of messages sent to this node.
4. Time of autonomous operation without replacing the power elements.</p>
      <p>Firstly, testing of the communication range and reliability of message transmission, or, in other
words, the quality of the wireless channel between the wireless sensor and the network coordinator,
was performed. Tests were conducted for different conditions, in particular for four types of terrain:
 Open territory, where the line of sight between signal source and signal receiver was present;
 Low vegetation, grass, many bushes, the line of sight between signal source and signal
receiver was present;
 Dense vegetation, many high trees, line of sight between signal source and signal receiver
was absent in most cases;
 Urban territory, line of sight between signal source and receiver was almost always absent.</p>
      <p>To conduct testing a special applied software for wireless sensor and network coordinator was
created. Testing was conducted accordingly to the next order:</p>
      <p>1. The wireless measuring node and coordinator sequentially were removed each from other on the
distance, divisible by 10 meters, until 160 meters.</p>
      <p>2. The wireless measuring node transmitted total 100 messages, 1 message every 500 milliseconds.
The size of every message equalled 1 byte. Coordinator recorded the number of received messages
and did not send the acknowledgment of message receiving.</p>
      <p>3. The coordinator transmitted total 100 messages, 1 message every 500 milliseconds. The size of
every message equalled 1 byte. The wireless measuring node recorded the number of received
messages and did not send the acknowledgment of message receiving.</p>
      <p>4. Scenario items 2 and 3 were repeated three times for every distance. This number of repetitions
was necessary to avoid the influence of accidental temporary obstacles or noise, which could be
caused by different sources.</p>
      <p>5. Coefficient of communication reliability (quality) was calculated as number of received
messages, divided by number of transmitted messages, and then this result was ranged from 0 to 100
percent. The average of six measurements of communication quality for each of given distances was
used for plotting the graph.</p>
      <p>By results of testing, the general dependence of coefficient of communication reliability (quality)
on distance between network coordinator and wireless measuring node was built (Figure 13).</p>
      <p>The graph (Figure 13) shows, that distances of stable connection for an open territory and territory
with low vegetation almost coincide. During testing the wireless network in conditions of dense
vegetation or urban or rural buildings the reliability (quality) of connection significantly worsens
because of the absence of direct sight between the coordinator and wireless measuring node.</p>
      <p>Before testing of wireless measuring nodes in field conditions, the modelling was conducted to
determine the time of autonomous operation without battery replacement. First, the energy
consumption of the measuring node was measured at all stages of its operation. All measuring nodes
operate from the battery with capacity of 200 mAh. We assumed, that Packert exponent or, in another
words, coefficient of incompleteness of discharge of battery is equal to 1,3.</p>
      <p>At the first stage, the measurement of power-consumption of measuring node was conducted for
the main operational modes "Wake from sleep – initialization – channel selection – clear channel
assessment – sleep". We obtained the next results (Table 4).</p>
      <p>The average supply current during all modes was equal to 6,21 µA. In such mode without
conducting any measurements the wireless measuring node can operate for more than 2 years without
battery replacement. At the same time we consider, that all time the network is accessible and wireless
measuring node does not search any new network for connection.</p>
      <p>During measuring, two new operational modes are added to mentioned above modes: measuring
and data transmission. It should be noted, that measurement can last 1 second, 10 seconds, 3 or 4
minutes on user choice. Also, it can be conducted one or several measurement per day, or one
measurement per several days. Testing showed, that supply current, needed for measurement, was
equal to 25 mA. For example, for one measurement during 10 seconds per day the average supply
current during 24 hours was equal to 9,1 µA, and for one measurement during 3 minutes per day –
58 µA. Experimental laboratory testing and calculations let to obtain the dependence of time of
autonomous operation of wireless measuring node without battery replacement on number of
measurements per day (Figure 14).</p>
      <p>As obtained results show, five monitoring measurements (3 minutes each) per day let us to expect
on 24 days of autonomous operation of wireless sensor without battery replacement. But, it should be
noted, in field conditions the time of autonomous operation can be decreased by such reasons, as
lessening battery charge because of temperature oscillations, increasing of supply current during data
transmission because of noise and obstacles etc. So, the actual time of autonomous operation of
wireless smart sensor in field conditions can be on 30% less, than value, obtained during laboratory
testing and calculations. After laboratory testing, modelling and calculation, the series of testing were
conducted in field conditions.</p>
      <p>The territory of orchard (cherry trees) was chosen as place for conducting the natural experiment,
which is the closest to the conditions of target application. The network cluster consisted of network
coordinator and four wireless measuring nodes. The operation of network coordinator and measuring
nodes was in normal mode accordingly to users guide. Measuring nodes was placed on the height of
1,5 meters above ground surface and at distance of 20–60 meters from the coordinator. The average
time of network organization was 6,75 seconds. A total of 82 measurement sessions were conducted.
The total number of successfully transferred measurements was 76. Accordingly, the integral score of
unsuccessfully transferred measurements equalled 7,32 %, what was caused by random noise and
obstacles on the signal path. The average level of battery discharge for all measurement sessions was
25–40%, depending on the distance between measuring nodes and coordinator and presence of noise
and obstacles.</p>
      <p>
        As can be seen, the results of testing in field conditions are almost identical to the results of
modelling and testing in laboratory conditions. Obtained data of testing prove the reasonability of
using the wireless sensor networks in the first chain of data acquisition and making-decision support
systems, which are intended for usage in agriculture, ecological monitoring and environmental
protection. The correctness of operation of applied software of network nodes and their interaction
within whole network approved by fast self-organization of network, a relatively high number of
successfully conducted and transferred measurements, as well as permissible discharge of batteries. A
small modernization of hardware and applied software of network nodes, which will be made by
results of testing, make it possible to get in the future the higher exploitation features of whole system
for target applications, not only for agriculture and ecological monitoring, but also for another fields
of human activity, e.g. for controlling the quality of food products [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>The article describes applied software of components of such complex hardware-software system,
as plants` state monitoring system for application in agriculture and ecological monitoring. The
mentioned system consists of data acquisition system in the form of wireless sensor network and
adaptive part in the form of decision-making support system. The authors described main applied
software of autonomous nodes of wireless sensor network and implementation of some program
functions of decision-making support system. Wireless sensor network includes many autonomous
wireless sensors, so the main criteria during applied software creation was assuring the energy
efficiency of operation of autonomous measuring nodes and network coordinator, and correct
interaction of nodes within all network. The main parameters, which define the correctness of applied
software operation, were estimated during conducted testing. These parameters include, for example,
time of network self-organization, distance and quality of stable communication, time of autonomous
operation of wireless nodes without charging and so on. Obtained data of testing of network nodes in
field conditions prove the reasonability of using the wireless sensor networks as data acquisition
system for making-decision support system to help the agronomist.</p>
      <p>To develop some software function of decision-making support system, firstly, the authors have
developed the applied method for express-diagnostics of plant state and estimating factors, which
influence the plant. For this purpose, the natural experiments were conducted to determine the
sufficient dose of herbicide application and estimating the soil moisture using the chlorophyll
fluorescence induction. For processing measured data, several methods of machine learning were
used, including neural network approach. Application of machine learning methods made it possible,
on the base of acquired data, to make early diagnostics of influence of stress factors on the plant even
before the appearance of visual manifestations of such negative influence and determine the decrease
of soil moisture through the diagnostics of plant itself, and inform the user about this. Thus, it can be
claimed, that the proposed system possesses some functions of artificial intelligence thanks to the
developed applied software.
8. References</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1] PreDiVine, Dolphin Engineering Sagl,
          <year>2022</year>
          . URL: https://www.dolphin-engineering.
          <source>ch [Accessed: 06 December</source>
          <year>2022</year>
          ].
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>AgroSense</surname>
          </string-name>
          ,
          <year>2022</year>
          . URL: http://www.agrosense.
          <source>hu [Accessed: 06 December</source>
          <year>2022</year>
          ].
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Wireless</given-names>
            <surname>Sensor</surname>
          </string-name>
          <article-title>Networks to monitor food sustainability</article-title>
          ,
          <source>Libelium</source>
          ,
          <year>2012</year>
          . URL: https://www.libelium.com/libeliumworld/food_sustainability_monitoring_sensor_network/ [
          <source>Accessed: 06 December</source>
          <year>2022</year>
          ].
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G.R.</given-names>
            <surname>Mendez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.A.M.</given-names>
            <surname>Yunus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.C.</given-names>
            <surname>Mukhopadhyay</surname>
          </string-name>
          .
          <article-title>A WiFi based smart wireless sensor network for monitoring an agricultural environment</article-title>
          ,
          <source>in: Proceedings of Instrumentation and Measurement Technology Conference (I2MTC)</source>
          , Graz, Austria,
          <year>2012</year>
          , pp.
          <fpage>2640</fpage>
          -
          <lpage>2645</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>V.</given-names>
            <surname>Romanov</surname>
          </string-name>
          , I. Galelyuka,
          <string-name>
            <given-names>H.</given-names>
            <surname>Antonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Kovyrova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Hrusha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Voronenko</surname>
          </string-name>
          .
          <article-title>Application of wireless sensor networks for digital agriculture</article-title>
          ,
          <source>in: Proceedings of Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications</source>
          , IDAACS'
          <year>2019</year>
          . Metz, France.
          <year>2019</year>
          , September 18-
          <issue>21</issue>
          , pp.
          <fpage>340</fpage>
          -
          <lpage>344</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>[6] Chlorophyll fluorescence spectral discrimination by artificial neural network methods</article-title>
          .
          <source>DEFRA project code HH1530SPC</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Kirova</surname>
          </string-name>
          , G. Ceppi,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chernev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Goltsev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Strasser</surname>
          </string-name>
          .
          <source>Using Artificial Neural Networks for Plant Taxonomic Determination Based on Chlorophyll Fluorescence Induction Curves. Biotechnology and Biotechnological Equipment</source>
          , volume
          <volume>23</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>sup1</given-names>
          </string-name>
          : XI Anniversary scientific conference,
          <year>2009</year>
          , pp.
          <fpage>941</fpage>
          -
          <lpage>946</lpage>
          . doi:
          <volume>10</volume>
          .1080/13102818.
          <year>2009</year>
          .
          <volume>10818577</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>V.</given-names>
            <surname>Goltsev</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Zaharieva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chernev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kouzmanova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.M.</given-names>
            <surname>Kalaji</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Yordanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Krasteva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Alexandrov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Stefanov</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.I. Allkhverdiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.J.</given-names>
            <surname>Strasser</surname>
          </string-name>
          .
          <article-title>Drought-induced modification of photosynthetic electron transport in intact leaves: Analysis and use of neural network as a tool for a rapid non-invasive estimation</article-title>
          ,
          <source>Biochimica et Biophysica Acta</source>
          <year>1817</year>
          (
          <article-title>8) (</article-title>
          <year>2012</year>
          )
          <fpage>1490</fpage>
          -
          <lpage>1498</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>K.</given-names>
            <surname>Rybka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Janaszek-Mankowska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Siedlarz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mankowski</surname>
          </string-name>
          .
          <article-title>Machine learning in determination of water saturation deficit in wheat leaves on basis of Chl a fluorescence parameters</article-title>
          ,
          <source>Photosynthetica</source>
          <volume>57</volume>
          (
          <issue>1</issue>
          ) (
          <year>2019</year>
          )
          <fpage>226</fpage>
          -
          <lpage>230</lpage>
          . https://doi.org/10.32615/ps.2019.017
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>G.</given-names>
            <surname>Soja</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.M.</given-names>
            <surname>Soja</surname>
          </string-name>
          .
          <article-title>Recognizing the Sources of Stress in Wheat and Bean by using chlorophyll fluorescence induction parameters as inputs for neural network models</article-title>
          .
          <source>Phyton</source>
          . Special issue: «D. Grill»
          <volume>45</volume>
          (
          <issue>3</issue>
          ) (
          <year>2005</year>
          )
          <fpage>157</fpage>
          -
          <lpage>168</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>X.E.</given-names>
            <surname>Pantazi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Moshou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kasampalis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Tsouvaltzis</surname>
          </string-name>
          .
          <article-title>Automatic Accessment of Phenotypes in lettuce plants by using Chlorophyll Fluorescence Kinetics and Machine Learning</article-title>
          ,
          <source>in: Proceedings of International Conference of Agricultural Engineering</source>
          ,
          <year>2014</year>
          , Zurich,
          <fpage>6</fpage>
          -
          <issue>10</issue>
          <year>July 2014</year>
          , pp.
          <fpage>167</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>V.</given-names>
            <surname>Romanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Galelyuka</surname>
          </string-name>
          ,
          <string-name>
            <surname>O. Voronenko.</surname>
          </string-name>
          <article-title>WSN for Food Product Quality Control</article-title>
          ,
          <source>in: Proceedings of Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications</source>
          (IDAACS'
          <year>2021</year>
          ), Cracow, Poland,
          <year>2021</year>
          , September 22-
          <issue>25</issue>
          , pp.
          <fpage>580</fpage>
          -
          <lpage>583</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>