A Proposed Low-Cost Viticulture Stress Framework for Table Grape Varieties

Climate change significantly affects viticulture by reducing the production yield and the quality characteristics of its final products. In some observed cases, the consequences of climate outages such as droughts, hail and floods are absolutely devastating for the farmers and the sustained local economies. Hence, it is essential to develop new in implementation monitoring solutions that offer remote real-time surveillance, alert triggering, minimum maintenance and automated generation of incident alerts with precision responses. This paper presents a new framework and a system for vine stress monitoring called Vity-stress. The Vity-stress framework combines field measurements with precise viticulture suggestions and stress avoidance planning. The key points of the proposed framework’s system are that it is easy to develop, easy to maintain and cheap to implement applicability. Focusing on the Mediterranean cultivated table grape varieties that are strongly affected by climate change, we propose a new stress conditions monitoring system to support our framework. The proposition includes distributed field located sensors and a novel camera module implementing deep neural network algorithms to detect stress indicators. Additionally, a new wireless sensor network supported by the iBeacon protocol has been developed. The results of the sensory measurements’ data logging and imposed image detection process’s evaluation shows that the proposed system can successfully detect different stress levels in vineyards, which in turn can allow producers to identify specific areas for irrigation, thereby saving water, energy and time.


Introduction
The Mediterranean area is getting drier, making it even more vulnerable to droughts and wildfires. High-resolution climate data and regional climate models show that in 50-years, an overall reduction of mean annual precipitation of 39.1-55.1 mm and an increase of mean air temperature of 1.5-2.3 • C are imminent. The consequence of these changes will be the increase of annual reference evapotranspiration to 92 ± 42 mm (6.7%) [1,2]. Some researchers and governments may consider the 50-year window span as a long time to plan and react. The news is disappointing as we are already going through the first 10 years of this prediction.
Consider Ensembles' climate projections for 2021-2050 forecasting which state that there was a temperature increase of about 1.5 • C and a precipitation decrease of about 7.5%. The authors of [3] predicted an average reduction in annual net revenue per hectare of 891.48 €/ha, corresponding to a 39% loss. However, it is worth mentioning that the losses have an impact in the cultivation. In particular, the annual net revenue showed strong reductions equal to 38%. These changes in weather conditions allowed the European Union to increase advance payments to farmers in 15 of the 27 Member States in 2017 [4].
IoT 2020, 1 On the basis of the official document of [5], climate change will have serious socio-economic consequences throughout Europe in the long term. Depending on the region within the European Union, the impacts of climate change will vary and sometimes from one member state to another. Drought is likely to increase in Central and Eastern Europe. The projected increase in drought and heat stress risks is estimated to be in the period 2023-60 and is expected to result in decreased crop yields. It is estimated that annual losses in agriculture in general could rise up to 8-15 billion euros by the end of the century. Greece, Portugal and Spain are hot spots that are likely to suffer from water scarcity.
In addition, a study conducted on the effects of climate change on grapevines that respond to water stress and drought has shown the negative effects of droughts start even before one might expect [6]. There are also suggestions for earlier grape harvest times in the future because they have noticed that berries are growing under such arid climate conditions will be significantly stressed, particularly in the Mediterranean area. Even though the use of safety nets is not common and expensive, they will probably be helpful in cases of hail and heavy rainfall, but with minimum improvements in drought and temperature levels concerning investment cost/production annual revenue.
Thus, the purpose of the current research is to monitor short-term and long-term temperature rises, and thus detect viticulture stress. For this reason, the Vity-stress framework has been developed to measure temperature, humidity, UV levels and soil moisture to control the quantity and frequency of watering vineyards. Additionally, water stress, leaf bleaching, degradation and senescence were detected using RGB cameras. We propose a new holistic framework for the detection of stressful conditions in a vineyard. The proposed framework is called Vity-stress and focuses on analyzing multi-source sensory data via intelligent statistical techniques and expert knowledge so as to enable proper delegate actions based on both temporal and spatial variability and information. The Vity-stress framework includes a decision support engine for viticulture cultivation. In addition, an appropriate validation system is given and validation results are discussed.
Section 2 presents the most common precision viticulture systems, devices, indexes and sensors used. In Section 3 we propose the Vity-stress framework, and the equipment and telemetry protocol supporting the framework. In Section 4 the Vity-stress image detection process and metrics are presented, and in Section 5 experimental scenarios of the proposed system are presented. Finally, Section 6 concludes the paper.

Precision Viticulture Systems
This section outlines the major systems and sensors that assist in the occurrences of climate change accounting and extrapolation of targeted agricultural guidelines. This means combining technological systems and sensors with accurate farming practices that provide stability and quality compared to traditional ones under difficult environmental conditions. Spectral measurements with the use of metrics in infrared and visible light (400-1400 nm) offer significant results regarding vine disease detection and stress. Redundant diseases of the vine and those with biotic stress show similar occurrences, both affecting the photosynthesis phenomenon and the physical structure of the grapevine leaves, thereby altering the absorption of light by the surface of the plant. Furthermore, the discrimination between disease and stress is a very complex experimental aspect that depends on environmental conditions, variety and cultivation practices used. Thermal infrared (TIR) multi/hyperspectral and sun-induced fluorescence (SIF) approaches together with classic solar-reflective (visible, near and shortwave infrared reflectance (VNIR)/SWIR) hyperspectral remote sensing are the state-of-the-art techniques for detecting water stress [7].
A case study for the development of spectral disease indices for the detection of FD disease in grapevines is presented in [8]. Even if hyperspectral devices far much narrower bands (10-20 nm) over the same frequency ranges, they offer more precise measurements. However, multispectral devices and imagery taken from UAVs, drones (of low resolution) or handheld equipment (of high resolution) are more commonly used than hyperspectral [9], due to their lower costs. Such low cost comes at the price of environmental interference and detection errors ranging from 5 to 15% [8].
The detection algorithms used (hyper or multi) for noise removal and resolution reduction are support vector machine (SVM), support vector regression (SVR) classifiers with different applicable kernels, fuzzy logic and knowledge-based rule set classifiers [10].
Air monitoring is essential for the detection of the consequences of climate disruption, such as hail or drought. However, such detection is governed by sparse area clustering and periodic measurements of poor resolution prone to errors due to the UAV's speed, distance from the vine, vertical camera lens orientation and focus. Take Sentinel-2 satellites which are able to detect the land's surface [11]. As far as camera lens orientation is concerned, drones have been proven to be more efficient due to their ability to stay still and drones' are capable of flying smaller distances to the viticulture stumps. However, GPS navigation issues leave space for handheld multi-spectral detectors performing sparse measurements.
Bhanarkar et al. suggests a field of soil salinity and moisture measurement system by wireless sensor network (WSN) [12]. This system is energy efficient, low cost, portable and small in size. The system architecture consists of water sensors in which when soil moisture module detects low humidity, outputs are high level, an 8-bit high-performance low power microprocessor and a compatible radio module which is based on IEEE 802.15.4 protocol, such as XBee [13]. Sensed data are wirelessly transmitted via concentrators to cloud data logging services, for soil moisture monitoring purposes. Subsequently, growers watch the soil moisture on their computer or mobile devices and can water the field once the values shown in the sensors are high. Based on the Bhanarkar approach, Kontogiannis is proposing a similar cheap and WSN system to support irrigation decisions based on a customized LoRa transponders communication protocol that controls the irrigation process using a FuzzyNN algorithm [14].
Vity-stress RGB camera indexes are described in Section 2.1, while we propose the Vity-stress camera framework in order to detect stress using 3 RGB cameras in Section 4.

Precision Viticulture Metrics and Indexes towards Stress
Existing viticulture systems can be categorized into distinct categories of macro-area or high-level surveillance and micro-area or dense probing surveillance. Macro-area surveillance is performed by means of remote sensing sensors or infrared, multispectral hyperspectral means. Remote sensing can be performed using robots, unmanned air vehicles (UAV), GPS autonomous vehicles or cameras in the visible spectrum. Proba-1 launched in 2001 for earth observations using a compact high-resolution spectrometer monitoring 18 user-selected visible and near-infrared wavelengths of 8-12 m pixel resolution, acquiring more than 20,000 environmental science images [15]. GeoEye is DigitalGlobe's high-resolution (1.65-m) imaging satellite, used by Google Maps, the National Aeronautics and Space Administration (NASA) Landsat 7-9 and EO-1 satellites [16]. Sentinel-2 from European Space agency satisfies of 12.5 m pixel resolution [17].
In this remote sensing process, data and models acquired from meteorological satellites in the EU, such as the Geostationary Operational Environmental Satellite (GOES), for the EU and Africa, METEOSAT, Soil Moisture Active Passive satellites (SMAP) and National Oceanic and Atmospheric Administration (NOAA) satellites in accordance with the dense positioning of meteorological and geodesy stations monitoring atmosphere water vapor content [18,19], offer solid grid observations and notifications of severe and abrupt weather incidents.

Spectroscopy and High Frequency Measurements
The main multi/hyper spectral measures used by these algorithms in order to detect vine stress are as follows: Normallized Difference of Vegetation Index (NDVI) [7][8][9][10]20] NDVI uses wavelengths in order to detect greenness accuracies, including grasses, bushes and tree canopies [21,22].

Photochemical Reflectance Index (PRI)
It has been used to detect plant water stress [23]. This index focuses on bands at specific wavelengths where photosynthetic pigments are affected by water stress conditions, such as the chlorophyll PRI index that is related to leaves' xanthophyl. When the PRI is high it is a stress indicator for the plant [24].

Leaf Area Index (LAI)
LAI is a macroscopic index of the estimated leaf area over the field area, by measuring reflected light near the soil by the plants, due to photosynthetic plant tasks. Specifically, for vineyards LAI measurements can distinguish severe stress events only and can be used as an evapotranspiration metric with doubtful results for vineyards, due to the plant orientation (layout lines with 1.2-2.4 m line distances and 30-80 cm vine distances) [25]. Similar to LAI is the visible-band difference vegetation index (VDVI), which is calculated based on the three bands of the visible light spectrum (RGB) [22].

Soil-Adjusted Vegetation Index (SAVI)
The SAVI index aims at enhancing the contrast between soil and vegetation, thereby minimizing the effects of illumination conditions [26]. For a specific amount of vegetation, darker soil substrates result in higher vegetation index values. SAVI is an aggregation metric of canopy and NDVI [27].

Viticulture Sensors and Metrics
Sensor deployment plays a significant role in monitoring of vineyard conditions at the stump level, called micro-vineyard monitoring. This is important for the detection of either stressful conditions or disease prosperous ones. Letting aside meteorological stations operating and providing micro-climate area predictions [28,29], this section focuses only on stump level vineyard condition monitoring sensors and metrics.
Wireless sensor networks for micro-vineyard monitoring are only for real-time monitoring tools close to the vineyard. Its dense spatial and temporal measurements can offer smooth data logging capabilities and timely alert triggering, indicating the exact problem areas [30]. As indicated by [31], weather swings affecting strawberry grape variety can be easily measured using HOBO sensors and Zigbee transceivers in the field.
Wireless sensor network deployments offer the advantage of low-cost implementations of precise and regular measurements concerning thermal or hyper-spectral cameras or satellite images. In addition, hybrid solutions using both WSNs and image sensing can achieve better results, no matter the cost of the equipment [32] may be. The main benefit of WSN deployment is that its continuous measurements offer the ability of climatic cartography and zoning over geographic information system (GIS) layers, which can be initially heuristically assigned based on elevation, sunbathing and past yield references, and thereafter dynamically updated by WSN measurements.
On the other hand, the deployment of WSN requires additional maintenance. The wireless technologies used by WSN viticulture networks in viticulture are ZigBee, LoRaWAN, 3G/4G, NB-IoT, Wi-Fi and custom RF. Apart from 3G/4G, the technologies used are of low power footprint, providing battery operated sensor motes with long lives [33]. However, the existence of standardized communication protocol for sensory measurements and alerts makes implementations cumbersome between different types of technology and manufacturers.
Most of the micro-vineyard WSNs include sensors and metrics for temperature, humidity and leaf wetness measurements and trends near the vine leaf area [34]. Additional sensors, including open type rain gauge sensors, wind speed sensors and direction sensors [35], whose deployment is expensive, are part of the upper-level micro-climate meteorological sensor grid whose measurements and predictions can be easily acquired either by microclimate meteorological reference points or open access meteorological initiatives [29]. Specifically, for rain fall and precipitation measurements, the EU countries stationary also utilize their global positioning system (GPS) geostationary grids [18], as part of the E-GVAP EU initiative [36].
Soil ground sensors measurements for water content play a significant part in the micro-vineyard monitoring. Since vine roots cannot reach depths greater than 60-90 cm, their water ground reservoirs are considered as surface ones and the soil moisture sensors' deployments are easy to setup, and provide temporal predictions by utilizing fuzzy and neural network algorithms [14]. There are three types of soil moisture sensors: (1) matric potential sensors, (2) time domain reflectometry (TDR) and time domain transmissometry sensors (TDT) and (3) capacitance sensors. Matric potential is the measurement of how tightly the water is constrained by the soil and is measured by tensiometer devices that use a water-filled tube and a ceramic holed tip, expressing the tube-soil water absorbance (tension) to kPa of the tube generated vacuum. The advantage of tensiometers is their medium cost and high accuracy when properly maintained. Their disadvantage is that they require significant maintenance, thereby making them a fair solution for small vineyards of less than 5000 sq.m.
Both TDR and TDT sensors use guided electromagnetic waves to measure soil dielectric constant and its variations due to soil moisture content [37,38]. TDR sensors measure soil reflectance using pulses and measuring pulse response, while TDT sensors use closed frequency oscillated wire loops and PLL detectors to measure phase shifts. These sensors are extremely low priced, 10-20 times lower than the cost of a tensiometer sensor, and of medium maintenance, which only includes cleaning and replacing of rotten electrodes. In this category of TDR soil sensors, soil moisture resistance sensors are included, which measure direct soil conductivity by amplification. These sensors are considered by far the cheapest solution, costing no more than 5e, but often require monthly electrode replacements in order to provide accurate measurements [14]. As far as tensiometers are concerned, TDR, TDT and soil conductivity sensors can provide accurate multiple soil depth adjustments. Finally, capacitance sensors are similar to TDR sensors with the difference that capacitance sensors determine the dielectric soil permittivity by measuring the charge time of a two-electrode capacitor, using the soil as a dielectric. Capacitance sensors are much more expensive than TDR, TDT and tensiometers with a cost magnitude of 5-10 times more than tensiometer sensors, but require even less maintenance, and provide more accurate measurements in different soil depths.
Sensory measurements of solar intensity and radiation, are used for the monitoring of micro-vineyards. To date, some secondary indices are recognized, particularly in relation to grapevine cultivation. The heliothermal index (HI) is the index that uses the daily temperature and solar irradiance to calculate the mass of leaves' photosynthetic products. Furthermore, the biologically effective degree days (BEDD) is an index that uses the sensory measured daily temperature difference between highest and lowest temperatures over the daily micro-climate min-max temperatures [32,39]. Furthermore, the statistical climate indices used to characterize suitability for viticulture: growing degree-days (GDD), the Huglin index (HI), the accumulated growing degree days (AGDD-the index for predicting the grape growing stage) and the average growing season temperatures (GST) can also be calculated from temperature measurements [40,41].
The solar intensity of reflective photosynthetic plant radiation is measured using by quantum light sensors [42]. These quantum light-photosynthetically active radiation (PAR) sensors, or ceptometers measure the number of photons absorbed in 400 to 700 nm band and thus provide a voltage index of the photosynthetic photon flux density (PPFD) gradient or the LAI metric canopy value [43]. Ceptometers and PAR meters are expensive devices due to their ability to self calibrate the monitoring frequency range of reflective radiation. Furthermore, the solar duration time is measured using light dependent resistors (LDRs).
Measuring solar radiation luminescence, manufactured leaf-shaped sensors are commonly used to quantify emission or reflection of flat, diffuse, uniform surfaces ( cd m 2 ), and pyranometers measure solar power ( W m 2 ) in a wide spectral range of 500 to 2800 nm. The frequency of measurements taken is either daily or hourly solar near-infrared spectroscopy (NIR), infrared (IR), falling radiation and optical light energy that can be absorbed by vineyards. Pyranometer sensors can monitor a wide range of frequencies of either NIR or IR received solar power. Appropriate sensors for solar ionizing radiation UVA, UVB and UVC can offer ionizing power measurements in the range 315-400 nm.
There are also three types of sensors. The first one is a CO 2 sensor placed in a cane near the trunk of a vine plant, in the upper cane area in order to measure vineyard anaerobic respiration. Dendometers, or digital caliper meters that are used to measure the swelling and shrinkage, growing or ripening canes as an indication of growth or plant stress [44]. Finally, a US patent of bipolar electrodes wrapped around the canes of a vine plant in order to measure cane nutrient ions moving from cane to the vine leaves and plant potential is proposed by [45]. The next section of the Vity-stress framework is presented.
In Section 3 the Vity-stress framework is presented which detects stressful conditions in a vineyard.

The Vity-Stress Framework
The quantity and frequency of watering vineyards are two important factors, especially under climate change conditions (decreased water availability, high temperatures and heatwaves, frost, etc.). The design of decision support logic takes into consideration all elements related to the climate change, like historical and real-time meteorological data, weather forecast, water availability and quality. Additionally, it takes into consideration the age and growth stage of grapevines, the variety and planting rate, the different growing techniques, the irrigation device, the soil quality, the soil moisture from sensors embedded in the ground and plant appearance.
The framework scheme involves the following application axes and assessments as illustrated in Figure 1: Step 1: Identifying and quantifying the impacts of climate change. Concentrating on drought and studying of commonly cultivated variety of table vines. Identifying of variability level/extent within a viticulture field and how climate change affects the qualitative characteristics of the product as well as crop yield are addressed with the use of cheap sensors built in a uniform sensor network.
Step 2: Evaluating the effects. Classification logic using support vector classifier is utilized, based on the acquired measurements from the sensors and micro-climate meteorological station measurements. The significance of the measurements are evaluated and ranked accordingly in hierarchical classes.
Step 3: Visualising the effects in real-time. An additional presentation layer provides classes and measurement visualization for the appropriate GIS service, provided by the framework.
Step 4: Providing viticulture stump detailed output response to farmers. Sensors assist the precision protocols' selection process (assessment methodology as presented at Section 3.1) and facilitate their application, using data mining and machine learning processes. Such incorporation provides GIS real-time measures' visualization, alerts to farmers on phenomena initiation, predicts its duration, along with indications and sensory trained model feedback for the deployed framework WSN.
The proposed Vity-stress framework decision logic classification leads farmers to a proposition called assessment rules. A summary of the assessment rules is presented in Section 3.1.

Vity-Stress Framework Assessments
Scientific literature indicates that there is a close relationship between territorial factors (climate, soil and viticulture practices) and grapevine growth and quality [46]. Precision viticulture is a site-specific, integrated information farming system which recognizes that the productivity of vineyards can be inherently variable, and consequently that is useful to establish zones of different practices within a vine plantation. Environmentally sustainable wine-making is used to optimize the production of vineyards through the use of natural resources, while minimizing unintended environmental impacts. This is achieved by collecting measurements related to the vine status, climate factors, soil characteristics and micro-vineyard conditions, and associate these measurements with assessment plans in order to turn this information into assessment policies. Rare rainfall and floods are the number one sources of water in regions that are semi-arid or fully arid where it is hard to manage water supply. In this section, proposed aridity risk assessment methods, parts of an assessment plan or precision practices that can be the output of measurements based on support vector classification machine (SVC), are described. These assessment methods can be part of the final decision output of the proposed Vity-stress framework, in order to prevent soil aridity, future aridity events and abrupt cases that need incentive care.
The availability of soil moisture affects both the yield and the quality of grapes, especially sugar content and color. For this purpose, we submit a decision on the support framework for the monitoring of micro-vineyards in cases of stress and therefore the scheduling of specific actions to be taken by farmers in the context of the proposed Vity-stress output response.

Controlled Irrigation processes
These are the most commonly used responses that take into account and use existing water surplus, offering time-based irrigation practices or water content controlled ones. It is essential for the irrigation process to tightly couple with the field measurements in order to provide more efficient smart irrigation practices based on fuzzy controllers or pre-trained neural networks or both [14]. If no water surplus from rivers, streams, lakes or other subterranean cavities is available, then other precision methods need to be used.

Water harvesting
Anschutz proposes various water harvesting techniques in order for growers to cope with soil moisture [47]. Typically, water harvesting is a collection of runoff. Runoff may be collected from roofs, ground surfaces or seasonal streams into wells or plastic underground tanks. We point out that water systems that harvest runoff from roofs or ground surfaces fall under the term rainwater. Systems that collect runoff from seasonal streams are grouped under the term floodwater harvesting.

Irrigating vineyards using wastewater
Vineyards can be irrigated by waste water. Etchebarne suggests that in order to maintain quality, especially for the wine grape, growers should maintain a perfect balance between fertilizing factors which are responsible for water quality [48]. We carried out an experiment on water quality and compared their study with other ones derived from the bibliography and showed that the nutrients concentrations and contents of the water could be directly linked to wastewater origins. The amount of water supplied varies and depends on climatic conditions-especially in arid or semi-arid regions-and whether the product is wine grapes or table grapes.

Using organic fertilizer such as manure
Samra tested the impact of using cattle manure with a low level of mineral nitrogen to meditate mineral nitrogenous fertilizer for Thompson seedless grapevines [49]. The study lasted three years between 2004 and 2006 and the results showed that using cattle manure at 5 kg/vine gave higher values of leaf area than using no organic fertilizers at all. Additionally, the truck thickness was the second factor that we examined presenting that cattle manure increased truck thickness by about 6%. Cattle manure increased the berry weight and diameter by about 35.5%. That is because cattle manure provides useful organics to the soil, as it contains organic matter that helps improve the natural chemical characteristics of the soil, increasing water retention while helping to better aerate the soil and drainage. Furthermore, pyrolysis generates carbon-rich organic materials generate by biomasses, such as biochar [50], without causing side effects in the soil, while improving locally soil fertility and moisture.

Water constraint natural materials
Attapulgite is a natural soil clay natural material and its characteristic is to enhance soil performance [51]. It is capable of absorbing the excess nitrogen, phosphorous and potassium and yields all that in the soil and the plants. Attapulgite performs high soil aeration and increases the soil moisture retention capacity by decreasing water use. Stocks of high quality of attapulgite can be found in the South East Grevena (mount Kisavos), in Greece. Attapulgite products are a series of 100% natural, environmentally friendly, clay soil improving materials; however, they are rare to find in natural mineral rock. Due to the very high surface area and absorbency of attapulgite in water, if used in powder form it can decrease watering needs, enhance nutrient absorption, improve soil aeration and fertility, increase the strength and growth of plants and is suitable for all outdoor and indoor plants, e.g., fruit trees, vegetables and vine plants. Similarly, zeolite can be easily incorporated in the garden or potting soils as a substrate. Due to zeolites's special characteristics, it is an excellent material for use as a water concentrate in vineyards as well as in soil mixtures for water preservation [52]. In this category we include any kind of rainwater constrained invention that provides this water to the roots of the vine plant in a controlled periodic manner with the use of mechanical means.

Appropriate vine pruning techniques
Vine pruning is an assessment to be applied for the next seasonal crop rather than to directly countermeasure the effects of an ongoing drought. However, it is a significant measure for the farmers to react in the near future. Section 3.2 presents the Vity-stress system proposed by the authors, supporting the proposed framework.

Vity-Stress Monitoring System
We propose a densely deployed sensor network of cheap sensors deployed near the vines along each vine lane. The proposed sensors include temperature, air humidity, leaf wetness and soil moisture resistance sensors, TDR soil moisture sensors, pyranometer sensors, UV sensors and digital calipers, as proposed in the framework to implement sensors packs.
These sensors are provided in autonomous packs in devices that include the following sensors: • These low-cost sensor packs include a (Bluetooth Low Energy) BLE sensor that transmits data periodically (with a duration of 30-120 s), using the iBeacon protocol [53,54] to a central point of connection called Vity-stress concentrator (VSC). The entire system of the sensors and concentrator is called the Wireless Vity-stress Network (WVN).
Due to the short range communication of the BLE beacons (no more than 50-100 m) several concentrators need to be placed inside a vineyard forming a dense WSN of multiple gateway points. The concentrators' cost supporting the Vity-stress framework must be at minimum 10-20 times less than the cost of a multispectral camera, thereby minimizing the cost per farmer. The VSCs acquires measurements from sensor motes (packs) called Vity sensor beacons (VSBs), spread out in the field, via proper Bluetooth Low Energy beacon-based application telemetry protocol transmitted periodically, encapsulated under the iBeacon frame [53], which lacks complexity and is more commonly used than its predecessor Eddystone TLM [54]. The proposed protocol is called the Vity-Stress Protocol (VSP) and its functionality is presented at the following Section 3.3.

Proposed Vity-Stress Protocol
We propose a new data transmission protocol for the process of receiving of sensory measurements from the Vity-stress sensor packs to the concentrator, called the Vity-Stress Protocol (VSP). The Vity-Stress Protocol (VSP) is designed for the Bluetooth Low Energy (BLE) technology which uses 2.4 GHz radio frequencies. In order to construct the VSP framework, a slightly different approach of the iBeacon protocol is proposed, taking advantage of Data Type 2 major and minor fields. In this approach, Data Type 2 is now called Vity Class, whilst UUID major and minor values have their initial names as they are predefined from the iBeacon protocol. The VSP structure is illustrated in Figure 2. In this protocol the existing iBeacon minor and major fields are used for the encoding process of telemetry data, since these values are rarely used by beacon advertising services. A similar approach to iBeacon major and minor fields reuse for interactive real-time indoor positioning services is presented by [55]. The VSP is encapsulated in the iBeacon frame [53]. The VSP does not include the default value of Data Form 2 which is equal to 0xff; that it is a called VSP class and is fixed depending on the sensory type used.
The high-level architecture communication between the beacon sensors and the concentrator is illustrated in Figure 3. Our protocol suite operates as follows: • Each beacon device cannot communicate with other beacon device and can only communicate with the concentrator.
• Each beacon device has a unique identifier (UUID). • Frames are 30 bytes long.
The network architecture consists of two entities, the transmitter and receiver, as shown at Figure 3. The transmitter (sensor pack) contains an entity equipped with arbitrary sensors and a concentrator which supports BLE version in order to collect the results. The sensors takes vine environmental measurements of air humidity, temperature, soil moisture, leaf wetness and solar radiation.
The purpose of the VSP-capable beacons is to create inexpensive battery-operated sensor kits that measure (e.g., humidity, temperature, soil moisture, leaf wetness, solar radiation), taking advantage of the major and minor fields of the massively used iBeacon protocol, which for VSP are not fixed, unique and change based on the values received from the beacon attached sensors. The major and minor values are 16 bits long, providing up to two 16 bit sensor measurements per transmitted beacon frame. If more sensors are attached to a beacon frame, time multiplexing is applied, according to VSP mode 2. The VSP protocol functional states are divided into two modes. The first mode has the ability to transmit the data from specific sensors (up to two measurements/frame) within an interval beacon time set to 1-5 min, as shown in Figure 4a. The second mode of operation is capable of transmitting sensory data more than two sensory values, by sending arbitrary time frames per beacon interval, known as the beacon interval. For example, in mode 2, temperature and humidity sensor measurements can be transmitted in the first beacon frame, followed by soil moisture and solar radiation measurements that can be transmitted by the second beacon frame (as shown at Figure 4b). The VSP classes are configured depending on the sensor type field, as shown at Table 1. If the value of the VSP class is configured as 0x01, which equals το b'00000001', then, the received value is derived from a temperature sensor. If the value of humidity is configured as 0x02, which equals b'00000010', the received value is derived from the humidity sensor. If the value of the VSP class is configured as 0x04, which equals b'00000100', the received value is derived from the soil moisture sensor. If the value of VSP class is configured as 0x08, which equals b'00001000', the received value is derived from the leaf wetness sensor. If the value of the VSP class is set as 0x10, which equals b'00010000' in the binary system, the received value is derived from the pyranometer sensor. The values 0x20, 0x40 and 0x80 respectively are set for future use.    Table 2, the sensors used by the VSP use the iBeacon major or minor field, depending on their priority accordingly.
The sensor's type and priority are in ascending order towards the MSB of the Data Type 2 class field. If only one sensor measurement is transmitted, it is stored in the major field of the VSP. Then the minor field receives the value of the most negative number (0x8000) so that the concentrator BLE decoder recognizes that there is only one measurement of the sensor in this frame.
The authors' VSP proposal is for an easy to implement version of a protocol using existing beacon protocol implementations. Furthermore, the iBeacon protocol maintains a Universally Unique Identifier (UUID) field that identifies each deployed sensor pack and beacon Tx power to determine beacon's distance. The wavelength of the VSP beacon can be calculated using TxPower using the received signal strength indicator (RSSI).
Validation results of the Vity-stress framework are presented in Section 5.

Vity-Stress Concentrator Architecture
We propose the use of a concentrator device used to collect measurements from sensors placed inside the vineyard field. The concentrator will be responsible for: a) collecting periodic measurements received by the nearby VSP capable sensors (beacons) and b) collecting images from the nearby vineyard trees with the use of its embedded camera subsystem. The Vity-stress concentrator (VSC) camera subsystem utilizes three RGB cameras positioned peripherally to cover a viewing angle of 120 • each, so altogether they cover a viewing angle of 360 • .
Communication between sensors and concentrator equipment is one way. The concentrator equipment receives periodically transmitted iBeacon frames and decodes their PDU payloads accordingly, based on the proposed Vity-Stress Protocol (VSP). Communication is between the concentrator devices and the cloud data logging service where the decision logic resides uses either NB-IoT or 3G/4G cellular technology. The concentrator device includes 3-camera system RGB cameras, with infrared capabilities, z-placed 120 • apart. Figure 5 presents the proposed Vity-stress system concentrator prototype equipped with RGB cameras.
In detail, the illustrated concentrator includes three RGB cameras on the z-plane that can be attached to a metal pole of 60-90 cm z-axis height, supported the metal pole pointy ground penetration edge ( Figure 5, (3)). The concentrator device includes a 6 V, 7-10 Ah battery pack that is charged by a 2 W-6 V panel placed on top of the concentrator, assuring its autonomous operation. There are three RGB cameras placed at 120 • apart at the same height around the outer polygon surface of the concentrator ( Figure 5, (5)). These camera modules are also equipped with IR night vision capability.
Due to the energy cost of 6-7 Ws of the 3-camera component to take a snapshot and a max total of 2 min in order for the Vity-stress image detection process to complete and upload the calculated indexes, the T p period for acquiring a scenery image measurement takes more than 1 h, to avoid battery depletion. The concentrator processing unit includes a quad core-ARM RPi microprocessor with 512 MB of RAM for the image detection processing tasks. The processing unit also includes an embedded BLE transponder for the reception of VSP protocol beacon frames and a Wi-Fi transponder for close-range communication-uploading to the VSP's cloud service imagery data and sensory measurements.
Communication between the concentrator and the Vity-stress sensory packs spread in the vine lines is performed with the use of the concentrator's BLE module. The concentrator operates in sensing periods (T sens ). During these periods, camera modules remain mainly inactive, keeping them in a low power state, and its BLE component ( Figure 5, (4)) stays in an off state. When the T sens interval expires, the camera modules are powered on sequentially by taking photos. Then the image processing step is performed, while the BLE transponders scan and log nearby beacons measurements (up to 60-80 m radius) using the VSP protocol.
Upon image processing and measurement acquisition completion, the external communication modules with the Vity-stress cloud are powered on. At first, the Wi-Fi transponder ( Figure 5, (4)) searches for open Wi-Fi access points with an Internet connection to transmit its annotated images and measurements, and if that fails using its 3G/4G USB dongle ( Figure 5, (7)). The protocol used for data uploads to the cloud is via JSON and HTTP POSTS.
The cameras are used to implement a cheap 360 • panoramic plane image detection system that uses image pre-processing, mask filtering and deep convolution neural networks (CNNs) for the detection of vine stress signs and yield potential. The concentrator image detection process and proposed metrics are presented at Section 4. The cameras are connected via appropriate USB interface to the processing unit, capable of enabling one camera at a time. The image capturing periods are set by the Vity-stress cloud service and are propagated to the concentrator as feedback parameters whenever the concentrator uploads new measurements or images. Since the image detection process is performed by the concentrator, there is no need for image uploads but detected segments and index values. Nevertheless, image uploads are necessary for the validation purposes. Section 4 describes the process of the image detection as well as the proposal indexes derived by vineyard images. With respect to existing multispectral camera technologies used extensively for the acquisition of periodic on the spot or UAV delivered LAI/NDVI/heat measurements, the Vity-stress concentrator can offer a much cheaper, closer at real time with high image resolution. This is achieved with the use of cheap CMOS RGB cameras and the implementation of convolution neural network algorithms (CNNs), for vine stress and also yield detection [56].
In Section 4 the proposed the Vity-stress image detection process is presented, which the VSC devices implement.

Proposed Vity-Stress Image Detection Process
For the processing of detecting viticulture stress using optical means called Vity-stress concentrators (VSC), we manufactured a device. This device is equipped with three RGB cameras with attached infrared transmitters, and offers night vision capabilities too. The VSC cameras are 120 • apart, offering a 360 • vision coverage at a vertical height of 80-120 cm. We give more details on this VSC equipment at Section 5. These VSC devices implement the Vity-stress image-detection process, as illustrated in Figure 6.
Leaf bleaching occurs at high temperatures, making the leaves take on a "bleached" look, due to thermal breakdown of the leaf tissue. This process is irreversible, and permanently reduces a vine's capacity for photosynthesis. If the water stress continues, embolisms (air pockets) may form in leaf vessels or shoot xylem, and the leaves begin to disintegrate and become senescent.
In serious circumstances, vines or shoots collapse. These cases (senescence, bleaching) can be detected separately by the use of two separate instance segmentation CNNs that estimate: (1) the coverage pixel area of senescence in vineyard contours, (2) a probabilistic approximation of leaf bleaching of detected leaves over total leaf areas in vineyard contours and (3) the yield production expressed as a cumulative multiplication of contour detection probability by detection area size in pixels. The proposed process test-bed outcome is illustrated in Figure 7. The proposed process uses four independent stages of detection. The first stage includes the completion of the filtering, image selection and calculation of the vegetated area from the RGB cameras. The second stage includes the segmentation and analysis of the viticulture area bounding box and the identification of the vineyard ROIs areas. From this process the proposed viticulture leaf index metric is calculated based on Equation (1).
where E C is the contour areas and C i is the i = 1 . . . n instance detected contours using the Mask-RCNN algorithm [57]. As an improvement of Faster R-CNN [58], the masked region-based convolution neural network approach (Mask R-CNN) focuses on the problem of instance segmentation [57]. The Mask R-CNN method adds to the Faster R-CNN an object mask prediction process in parallel with the existing bounding box R-CNN process. Mask R-CNN is simple to train, and adds only a small overhead to Faster R-CNN, running at 5 fps [57,59,60]. In order to identify viticulture cultivation regions of stress: The leaf regions of stress are indicated by the use of (1) a single shot detector (SSD) semantic segmentation process [61], for the detection of bleaching as shown at the top left and top right subfigures, 1 and 2, of Figure 7 a color mask applied in the previously detected Mask R-CNN ROIs, while calculating the areas of discoloration, in order to calculate areas of leaf stress as shown at the bottom left subfigure, 3, at Figure 7. Then a new proposed index value is calculated called viticulture stress index (VSI), based on Equation (2).
where ROI i , i = 1 . . . m are the bounding boxes of the selected by the SSD algorithm as regions of interest containing a bleaching leaf area with accuracy p i , expressed as confidence probability and E C i the pixel areas of the instance ROIs masked by an instance segmentation algorithm such as the Mask-RCNN algorithm [57], where: Finally at the forth optional stage the viticulture coverage area yield is detected and recorded as an absolute number of grape bounded contours detected by the SSD algorithm, with confidence more than 0.75 p i ≥ 0.75, or if the table variety's yield is of red color as percentage of the pixels coverage area of the already detected viticulture Mask-RCNN contour areas, using appropriate HSV blue or red color region mask. For the produced yield we propose the viticulture yield index (VYI) value calculated by Equation (3).
where C j are either the detected ROIs of detected grapes with confidence greater than 75% using SSD [61] or Faster RCNN [58] semantic segmentation, or for red varieties the parts of the C i leaf contour areas detected with blue or red masked color coverage, and the application on these contours to the Douglas-Peucker algorithm contour approximation for polygon shape or convex hull.

Vity-Stress System Experimentation
System experimentation includes experimentation with the VSP and VSP capable sensors' experimental scenarios of coverage and frame loss. Our experimentation and a validation of the proposed VSC image detection algorithm with respect on detecting vineyard water stress follows using RGB images, taken from the VSC component.

Experimental Scenario and Results of the Vity-Stress Protocol
Vity-stress system and protocol experimental scenario included the deployment of five pieces of Vity-stress sensory equipment as illustrated in Figure 3, in the 2.83 hectare viticulture field of debina vine variety [28], at the area of Zitsa, Ioannina Greece, owned by the author Dr. Kontogiannis. The vineyard consisted of lanes that are 100 m long with inter-lane distances of 1.60-1.80 m. The purpose of this scenario was to test the operation of the VSP, and determined the maximum coverage area.
In order for the VSP to be examined, three beacon devices were placed. One of the beacon devices contained the VSP class of the VSP that consisted of a soil moisture sensor and a spot temperature sensor, and the other two of the beacons contained humidity and temperature sensors. Those two beacon sensors included one RGB LED each that indicates optically the levels of temperature and humidity using red color beeps for temperature (1 • C resolution) and blue color beeps for humidity (5% resolution).
The beacons were initially placed in the same lane at distances of 20 m (case 1) in order to cover as much area of the field as possible. Then they were switched into different vine lanes at the same imaginary line, using the same 20 m distance between beacons (case 2). In both cases the received signal strength indicator (RSSI) and the frame loss were measured, under a specified frame reception window using 350 ms beacon interval and a maximum of 36,000 beacon frames in 1 m beacon distance. Measurements were performed with the use of an Android phone application. In this experimental scenario the Android phone was placed 5 m from the center beacon, thereby having a maximum distance of 40 m from the farthest VSP beacon. The results have claimed that both cases 1 and 2 showed no significant variations in frame losses at the same distances. The results for cases 1 and 2 are presented in Table 3. Experimental results showed that the vineyard did not significantly affect the loss of signal between the farmer's mobile phone and the beacon device. From the Table 3 results, an energy conserving beacon's deployment scenario indicated a maximum distance between VSC and beacon equipment of 20 m. Since the beacons were placed in the vine lanes and the VSC must also have been in a vine lane, a VCS and four beacons occupied an area of up to 800 m 2 , if enforced in a square placement configuration. If the vineyard area beacon coverage was planned in a less energy efficient manner (of 40 m distance between VSC and beacon device) the coverage area using one VCS and four beacons can reach up to the 0.60 hectares. Table 4 shows the Tx power of the beacons frames received by the mobile phone device over distance (RSSI value is −59 dBm at 1 m). The deviation of RSSI values for cases 1 and 2 has also been measured. According to Table 4 there is a significant deviation in the RSSI measurement for cases 1 and 2 when the distance between beacons and mobile phone is ±7 dBm. Nevertheless, such deviation in the signal strength does not significantly affect less the packet loss. For the intended use this variation can be set as non important.
Finally, the maximum coverage that was tested reached 92 m away in the same vineyard row and 82 m from the beacon device between different vineyard rows (worst case 2). The mean packet loss in both cases was more than 95%. From the Vity-stress system experimentation, the implementation simplicity of the iBeacon protocol on top which the VSP protocol operated offered adequate measurement results even with 60 m distances between the collector device and the beacon equipment. The beacon frame interval can be increased up to 5-10 min in order for the device to conserve energy. The Vity-stress system also presented increased scalability and portability over other sensor network systems, since the iBeacon protocol was the most supported protocol over BLE, thereby giving the ability for the system even to operate without a concentrator device and just only a mobile phone with an appropriate data logging application.

Validation of the Viticulture Stress Index
In this scenario the VSC concentrator equipment, as illustrated in Figure 5, has been tested. At first connectivity and data logging capability of the VSC were validated the measurements of Table 3. The VSC equipment ARM microprocessor included a 4G USB dongle along with the three USB connected cameras in order to upload the measurements and images to the Vity-stress cloud application service (AS). The VSC concentrator included the image detection logic for the calculation of the VSI index (see Equation (2)). That is, at first it ran the SSD image segmentation algorithm using a pre-trained network in order to identify ROIs of interest (leaves areas, instances of vines-see Equation (1)), and then applied on those ROIs only appropriate HSV filter masks in order to detect leaf discoloration (yellowish contour areas indicating stressed leaves). The SSD algorithm and its confidence level thresholds were used for the detection of the vineyard area segments per captured image. The calculation of VSI index value was performed using the Equation (2) where the nominator included only the masked pixel areas' sum of all detected contours of yellow mask filtering discoloration that occurred inside the SSD vineyard segments detected. Since the max power consumption of the VSC concentrator during 4G data transmission and image capturing was at 1.2-1.3 W, The VSC ARM microprocessor was programmed to power on once every 30 min and to operate for 5 min. During those 5 min of operation the VSC turned on its camera modules; captured three distinct image frames and executed the SSD and mask process for the VSI calculation; calibrated the mean from previous snapshot values and the three cameras distinct frames using an EWMA process; and uploaded the masked snapshot images and calculated VSI values from the AS.
In Figure 8, the top left three images which are indicated as the number 1, present a non stressed scenario at the tested vineyard. The top right image indicated as 2, shows an area in the same vineyard where low water stress was detected, while the bottom right image shows the detection of a highly stressed vineyard lane, as detected by our algorithm, and indicated values of the VSI index. In this experimental scenario the SSD algorithm has been used to detect the vineyard areas (bounding boxes) in each image and the associated prediction confidence level. We set to distinct threshold confidence levels for the detection of vineyard segments in images: th = 0.5 and th = 0.7 accordingly. These threshold values indicate that contour areas detected as vineyards with confidence level above the threshold value are taken into account in the VSI index value calculation along with their detected confidence values expressed as probabilities of occurrence (p i ). The VSI index-calculated results for the cases of (1) not stressed, (2) low stressed and (3) high stressed vineyards are presented at Table 5.  Table 5 results have shown that using the SSD algorithm with vineyard confidence level ≥0.5 characterized as not-stressed VSI index limits gets between 0.01 and 0.23. For low-stressed vineyard VSI index limits, values ranged from 0.24 and 0.45 and for highly stressed ones, VSI index limits received values that were greater than 0.45.
When the detection confidence level for SSD was greater than 0.7 (previous accurate vineyard area detection), for not stressed vineyards, VSI index values ranged between 0.01 and 0.15. For low stressed vineyards, VSI index limits received values from 0.16 to 0.32 and for highly stressed vineyard VSI index values were greater than 0.32. However, the proposed image processing results would need further validation of the acquired stress index values and yield. This additional information would be provided by a densely deployed wireless sensor network (WSN) and future VSC deployment and planned and funded experimentation.
Lighting differences are a serious aspect for the Vity-stress index calculation (for the senescence detection). Since part of this process includes the detection of areas of color differences, it is highly susceptible to light variations. However, if performed to a specific vineyard field, appropriate color mark range calibrations are performed with the use of farmers' feedback in cases of erroneous stress alerts. Additionally, multiple images are taken during the day and the VSI masking process is calculated as a mean daily average value.
VSI CNN segmentation processes (SSD and Mask-RCNN) for the detection of leaf areas are much more controlled, since the cloud post processing training process depends only on collected and annotated images from each specific vineyard where the VSC concentrators are installed. During this training process a series of at least 500 images needs to be collected by the VSC devices to the cloud application service. Then a filtering and image annotation process are performed by hand for the removal of images that are of excessive lightning or no lighting and for the annotation process of vineyard and lead areas. The building of the SSD and Mask-RCNN model uses the pre-trained mobile-net v2 models where the additional classes of vineyard and leaf areas are added. Finally, the trained model for each vineyard is placed on the Vity-stress cloud repository and it is downloaded by each VSC component separately. Upon downloading the model, the VSI calculation process is performed in real-time by the device and the mean detection process time is also calculated. Results have shown that using a 1 GHz single ARM core/512MB, the SSD process's mean time range is 3-12 s and the Mask-RCNN process's mean time is from 6 to 18 s.

Conclusions
This paper proposes a new framework called the Vity-stress framework, for vine stress detection and the application of climate change mitigation policies towards stress. It focuses on existing viticulture techniques metrics and indexes used for vineyard monitoring and stress detection.
Taking one step further, we propose the Vity-stress framework, incident detection and assessment methodology for the classification and assessment of vines' stress. The target of the Vity-stress framework is to detect and analyze stressful conditions, such as very high temperatures due to climate change, water needs, low levels of soil moisture, low air humidity and very high solar radiation.
The Vity-stress framework is supported by a new proposed real-time system that includes sensors for the process of vine climate monitoring and therefore the identification, quantification, evaluation and classification of the stressful occurring events. The proposed system provides response output to farmers according to the proposed framework.
We proposed the Vity-stress system proof of concept implementation is supporting the aforementioned proposed framework deployed with temperature, humidity, leaf wetness, resistance soil moisture, TDR soil moisture, pyranometer and UV sensors and digital calipers. Communication between sensors and the concentrator is one way. The concentrator is called the Vity-stress concentrator and is equipped with three RGB cameras attached to infrared transmitters.
The Vity-stress image detection process filter selects and calculates the vegetated area, and uses deep learning neural networks algorithms and image masking for the detection of the vine location, stress and yield. The evaluation results of the SSD stress areas segmentation algorithm can successfully detect no stressed, low stress and high stress in the vineyard. The purpose is to replace the use of expensive multisprectal cameras. The aforementioned Vity-stress concentrator receives iBeacon frames within a beacon interval and decodes the payload based on the authors' proposal Vity-stress telemetry protocol. The Vity-Stress Protocol (VSP) takes advantage of the data type of the payload bytes which we use to change depending on the sensors' measurement and the initial configuration.
Experimental results show both the applicability of Vity-stress beacons (sensors) and VSP used that cover vineyard areas and log micro-climate sensory measurements, and pinpoint the significance of using RGB cameras to detect vineyard stress. The RGB image stress detection process, applied by the VSC concentrator, successfully detected and classified the vineyard stress contours in three different cases: (1) no stress, (2) low stress and (3) high stress. The proposed image stress detection algorithm's processing time was also calculated to be less than 1 min, which signifies the system's close to real-time functionality.
The Vity-stress system's deployment of cheap beacons spread in the viticulture fields and the use of the farmers' mobile phones in order to acquire notifications and field measurements that indicate the appearance of abiotic stress are significant system capabilities. Since irrigation is a key concept for table grape varieties for grapevines, the availability of sensory measurements will further enhance irrigation scheduling. Taking into consideration all elements related to climate change from field distributed sensory kits will also provide new irrigation practices and precision methods for sustainable vineyard agriculture.
Funding: This research received no external funding.