Keywords

1 Introduction

Water management is important for the adaptation of climate change. Shortage of water resources are directly affects the vulnerability of ecosystems, socio-economic activities and human health. On the other hand climate change is likely to lead to major changes in water availability across Bangladesh with increasing water scarcity and droughts mainly in North-West part of this country.

It’s assessed that as much as 50% of irrigation water is wasted due to evaporation or runoff. This happens because most irrigation systems still rely upon simple human reading. However, Internet of Things technologies can provide “Smart” irrigation systems. It can be useable for monitoring soil conditions, surface water level in real time with low power, wireless sensor networks. The wireless sensor networks send the data to a central network gateway, and the network gateway sends the data to the cloud platform. The gateways have the ability to connect via both wired and cellular data connections, so that can be point them from anywhere. In the internet cloud platform machine learning applications can be used for sending the application result to the end users mobile phone or personal computer.

This research mainly focused on the utilization of ground water in weather-based irrigation field. Weather-based irrigation determines the amount of water needed by the landscape based on the current weather conditions, such as precipitation, solar radiation, temperature, relative humidity, and wind speed. Weather data is provided by IoT based land weather station. Data from the weather station matching with measuring the level of water by using distance sensor where mainly measure the level of water loss from the soil due to evaporation and plant transpiration. This water level data in millimeter will be as a class data with other weather perimeter. A machine learning technique multiple linear regression algorithm is used here for prediction of water loses due to this weather condition in near future.

2 Related Works

In Bangladesh, mainly in the north-west part of this country, ground water is the main source of irrigation. Shahid and Hazarika (2010) investigated groundwater scarcity and drought in three northwestern districts of Bangladesh. They proposed a Cumulative Deficit approach from a threshold groundwater level has been used for the computation of severity of groundwater droughts. Their research shows that groundwater scarcity in 42% area is an every year in the region. The daily evapotranspiration from rice field will increase by an average of 31.3 mm and 0.33 mm/day respectively by the year of 2100 (Shahid 2011). The main finding of this research is that climate change will increase the daily use of water for irrigation by an amount of 0.8 mm/day in the end of this century.

In their research finding Qureshi et al. (2014) shows that 35,322 deep tubewells, 1,523,322 shallow tubewells and 170,570 low lift pumps are working in Bangladesh to provide water for irrigation. About 79% of the total cultivated area in Bangladesh is irrigated by groundwater, whereas the remaining is irrigated by surface water. More than 90% of the pumps within Bangladesh are run by diesel engines. The remaining 10% use electricity. Despite subsidies on electricity, diesel pumps are preferred by farmers due to low capital cost and mobility ease within small and fragmented farm lands. Each year, on average, about 980 million kWh of electricity is used by electric tubewells with an estimated subsidized cost of USD 50 million. The annual diesel consumption for groundwater extraction is of the order of 4.6 billion liters, costing USD 4.0 billion in aggregate.

40 million people are at risk of arsenic poisoning-related diseases because the ground water in these wells is contaminated with arsenic. Alam et al. (2002) reviews the arsenic infection of ground water, hydrological systems, groundwater potential and utilization and environmental pollution in Bangladesh. They discussed the main actions required to ensure the sustainable development of water resources in Bangladesh. Safiuddin and Karim (2001) also highlighted the causes and mechanism of arsenic contamination and presented several measures to remedy the arsenic contamination in groundwater. Another survey by Meharg and Rahman (2003) shows that paddy soils throughout Bangladesh showed that arsenic levels were elevated in zones where arsenic in groundwater used for irrigation was high, and where these tube-wells have been in operation for the longest period of time. The finding of another research of Meharg (2004) is “Arsenic is sequestered in iron plaque on root surfaces in plants, regulated by phosphorus status, and that there is considerable varietal variation in arsenic sequestration and subsequently plant uptake, offers a hope for breeding rice for the new arsenic disaster in South-East Asia – the contamination of paddy soils with arsenic”.

For reducing the wastage of ground water smart irrigation system is now the most prioritize topic in agriculture research. Mathurkar and Chaudhari (2013) focused on optimizing water management for agriculture through the physical and socioeconomic conditions that inspired the success of an “indigenous technology” which has for spanning exploited the potential for excess harvesting. Monda et al. (2011) described a Precision Agriculture (PA) concept was initiated for site specific crop management as a grouping of locating system. By using this way of proper resource utilization and management, to a environmental friendly sustainable agriculture is possible that they focused. Nandurkar and Thool (2012) designed a sensing system is based on a “feedback control mechanism” with a integrated control unit which standardizes the flow of water on to the field in the real time based on the rapid temperature and moisture values. They also prepared a table that discover the amount of water needed by that crop. Roy and Ansari (2014); Awasthi and Reddy (2013) developed the irrigation control system to avoid wastage of water and increase irrigation efficiency by using a PLC based irrigation system with the help of soil moisture sensor, water level sensor, and GSM controller. Their system can be used for sending message to farmer on mobile through GSM network for controlling actions.

Many machine learning techniques have been developed for learning rules and relationships automatically from various agricultural data sets. McQueen et al. (1995); Ozdogan et al. (2010) described a project that is applying a range of machine learning strategies to problems in agriculture and horticulture. They experimented and described some software requirements on real-world data sets. They also explored the value of archived data that enable comparison of images through time. Ozdogan and Gutman (2008) presented a dryland irrigation mapping methodology that relies on remotely sensed inputs from the MODerate Resolution Imaging Spectroradiometer (MODIS) instrument. They proposed different steps for mapping expected patterns where the dividing of majority of irrigated areas is concentrated in the dry lowland valleys. Image processing is an effective tool for analysis of the agriculture data sets (Vibhute and Bodhe 2012). This paper focussed on the survey of application of image processing in agriculture field such as imaging techniques, weed detection and fruit grading.

A machine learning technique Support Vector Machines (SVMs) was used for classified various crop types in a complex cropping system in the Phoenix Active Management Area (Zheng et al. 2015). They used “Landsat time-series Normalized Difference Vegetation Index (NDVI)” data using training datasets selected by two different approaches: stratified random approach and intelligent selection approach using local knowledge. For weather prediction (Radhika and Shashi 2009), long-term prediction of lake water levels (Khan and Coulibaly 2006), SVM is the most promising technique for better expectation. SVM can also be used for time series application in many application areas from financial market prediction to electric utility load forecasting to medical and other scientific fields (Sapankevych and Sankar 2009).

3 Multiple Linear Regression Algorithm

A multiple linear regression (MLR) model that describes a dependent variable y by independent variables \( {\text{x1}},\,{\text{x2}},\; \ldots , \,{\text{xp}} \) (p > 1) is expressed by the equation as follows, where the numbers α and βk \( \left( {{\text{k}} = 1,\;2,\; \ldots , \,{\text{p}}} \right) \) are the parameters, and ϵ is the error term.

$$ y = \alpha + \sum\limits_{k} {\beta_{k} x_{k} } + \epsilon $$

For example, in the built-in data set stackloss from observations of a chemical plant operation, if we assign stackloss as the dependent variable, and assign Air.Flow (cooling air flow), Water. Temp (inlet water temperature) and Acid.Conc. (acid concentration) as independent variables, the multiple linear regression model is:

$$ Stack.Loss = \alpha + \beta_{1} *\,Air.Flow + \beta_{2} *\,Water.Temp + \beta_{3} *\,Acid.Conc. + \,\epsilon $$

4 Methodology

4.1 Hardware Specifications

To read real-time data is typical of a weather station, using different sensors, and capable of communicating via LoRa. After a review of all known hardware available on the market, all the components strictly necessary to the solution were defined, which in turn fulfilled the requirements of the above: The hardware chosen was:

  • Adafruit Feather 32u4 RFM95 LoRa Radio with female pin headers2

  • Adafruit RTC DS32313

  • Sparkfun Weather Shield with RJ11 female connectors4

  • Wind and Rain sensors kit5

  • Antenna 868 MHz and SMA cable

4.2 Core System Controller

In terms of the core system within the Weather Station solution, it is composed by the Feather32u4, which that takes a specialized role in the system where it performs control functions through software, with processing power, enabling the sensory devices to gather data from the environment, using specific libraries. This system also has built-in communication capabilities.

4.3 Data Acquisition

The weather shield is an integrated module with several built-in sensors capable of collecting data, such as temperature, humidity, luminosity, barometric pressure and altitude. Along these sensors, the weather shield also enables the integration of three more different sensors to collect data regarding wind direction, wind speed and amount of rain. Based on the proposed model, it becomes clear the connection between the controller and the Weather Shield. This connection is established with the I2C protocol that allow this digital integrated circuit to communicate with one or more masters. It is used this type of protocol because it’s only intended short distance communications within a single device and only requires two signals to exchange information. The software controller uses the library “Wire.h” that is dedicated to the I2C logic protocol. The embedded software requires the “SparkFunHTU21D.h” and “SparkFunMPL3115A2.h” libraries in order to call all the functions responsible for activating and reading the sensors signals coupled to the weather shield.

4.4 Data Communication

Like as expected in the proposed system model, the controller will send data to the outstation, based on the information collected from the weather shield module. For this it makes use of the “SPI.h” library to run the communication with the radio module RFM9x LoRa 868/915. The LoRa radio must communicate with the LoRa gateway, specified by the system, and for that will interact with the “featherLora.h” library. The data will be collected according to the time windows described, already considered in the project. At the end of each time window will be sent the package with the message containing the information collected. In data sharing with outstation it was established to send an acknowledge information packet like a result of the incoming data from the different sensors. The typical message to be sent from one gateway to another is based on the type message as described in the following example:

Example of the message send in the package:

\\!TC/18/HU/85/LU/0.56/ WD/90/WC/5.55

The following table outlines the type and content of the information sent in each package (Table 1):

Table 1. Communication package.

4.5 Water Level Measurement by Ultrasonic Sensor

Ultrasonic distance measurement sensor is used to observe the level of water and radio communication of this value via license free LoRa devices is used under different package simultaneously with weather station. Temperature compensated distance sensor US-100 (Voltage 2.4–5.5 V), Arduino Pro Mini 3.3 V (8 MHz) version, energy source (2 or 3 battery type AA), Radio module used in this package.

The architecture of proposed model and it’s operating flow with the set specifications (Fig. 1):

Fig. 1.
figure 1

Architecture model with the set specifications.

5 Result and Analysis

The following result has been found from this testing dataset:

figure a

Multiple R-squared: Approximately 79% variation in water level (Distance in Millimetre-DM) can be explained by this model. (Wind direction-WD, Wind Speed-WC, Humidity-HU, Luminous-LU and Temperature-TC).

F- statistics: These tests are null hypothesis and all the model coefficients are 0.

Residual standard error gives the idea of how far observed water level -DM (Y-values) are from the predicted or fitted DM (the Y-hats). This gives us an idea of a typical size of residual or error e = y – y′.

The intercept shows the estimated mean Y value when all Xs are 0. We can associate with increase some values of wind direction, speed or other values water level adjusting or controlling the for Luminous or humidity. The hypothesis test that the slope for WD or others is 0.

figure b

The collinearity between WD and WC means that we should not directly interpret the slope, as the effect of WD on DM adjusting for WC. The high correlation between two values suggests that these two effects are somewhat bounded together.

Here confint values shows the slope for the level of 95%.

figure c
figure d
figure e
figure f

6 Conclusion

This IoT based machine learning works was my sample hands-on experience with real time data. Behind this task, it has a lot of preparation for a big part: it involved data understanding, sorting and reframing. That is beyond of this research work. A sample small scale data just used here to show the result for predicting data model. It is definitely challenging to work with this type big data. And finally, as I tried to understand the different correlation relationships between the parameters and the forecasts, I surprisingly also got a better understanding of prediction from the information of weather perimeters and IoT data collection point of view.