Professional Documents
Culture Documents
INTRODUCTION
agriculture research is to define a decision support system (DSS) for whole farm
management with the goal of optimizing returns on input while preserving resources. The
farmers and researchers ability to locate their precise position in a field allows for the
crop yield, terrain features/ topography, organic matter content, moisture levels, nitrogen
The Internet of Things is the network of physical objects outfitted with electronics that
enables data collection and aggregation. IoT comes into play with the development of
senor and farm-management software. Farmers can measure phosphorous, potassium, and
continuous and has a constant slope. It is used to predict the values within a continuous
range, rather than trying to classify them into categories. Linear Regression uses
of soil nutrient concentration, and strong relationships between EC and nutrients may
1
Deep Learning is class of Machine Learning algorithms that use multiple layers to
progressively extract higher level features from raw input. Deep learning is part of a
border family of machine learning methods based on artificial neural networks. Learning
learns to perform classification tasks directly from images, text, or sound. Deep learning
performance. Models are trained by using a large set of labelled data and neural network
ANN is a layered approach to processing information and making decisions that ANNs
are trying to simulate. In its simplest form, an ANN can have only three layers of
neurons: the input layer (where the data enters the system), the hidden layer (where the
information is processed) and the output layer (where the system decides what to do
based on the data). But ANNs can get much more complex than that, and include multiple
hidden layers.
Deep learning represents the very cutting edge of artificial intelligence. Instead of
teaching computers to process and learn from data (which is how machine learning
works), with deep learning, the computer trains itself to process and learn from data. A
2
CHAPTER 2
3
6. Prediction Time series September Phosphorous Further
Forecasting is 2019 content is developed for
used for measured for future
Prediction future enhancement
4
CHAPTER 3
PROBLEM STATEMENT
Precision agriculture is an emerging farm management strategy that is changing the way
people farm. The key factor of soil is Phosphorous. Phosphorous is an essential nutrient
both as a part of several key plant structure compounds and as a catalysis in the
more difficult to diagnose than a deficiency of nitrogen or potassium. A wide range of IoT
and Deep Learning technique is used to build a more accurate system. To measure the
phosphorus, methods available only based on lab assisted techniques and time
consuming.So we need to develop a handy method for assess the phosphorus value based
other soil parameters such as,Soil temperature, Soil humidity, Soil moisture. The deep
learning platform reads the data and predict the phosphorous content.
5
CHAPTER 4
4.1 INTRODUCTION
4.1.1 PURPOSE
Sub-Heading : 12 pts
Description : 12 pts
This document is intended for the developers. This SRS contains the purpose of the
proposed method and the diagrams explained for reference. The table also included to
clearly explain the use cases and sequence of the proposed method. And also it explains
6
4.1.4 PROJECT SCOPE
The scope of the proposed system method is to estimate the phosphorous content present
A method is proposed that uses deep learning based technique to measure the
Conductivity. Deep Learning (Back Propagation) is used for training and testing purpose.
Using the state of the art considerable efficiency upto 90 percentage can be achieved.
It is created with the help of GOOGLE COLAB . This product can be changed with this
IDE and updated version using windows OS 7, 8, 10 by any personal computer, and has
Maintainability
7
Usability
Availability
method
Hardware Requirements:
•
Processor - Intel Pentium
RAM - 4GB(min)
Hard Disk - 40 GB
Monitor - SVGA
NodeMCU is an open source IoT based firmware developed for ESP8266 Wi-Fi chip. By
exploring functionality with ESP8266 chip, NodeMCU firmware comes with ESP8266
8
Development board/kiti.e. NodeMCU Development board. Since NodeMCU is open
source platform, their hardware design is open for edit / modify / build. NodeMCU Dev
Kit/board consist of ESP8266 Wi-Fi enabled chip. The ESP8266 is a low-cost Wi-Fi chip
developed by Espressif Systems with TCP/IP protocol. For more information about
ESP8266, you can refer ESP8266 Wi-Fi Module. There is Version2 (V2) available for
The digital temperature and humidity sensor DHT11 is a composite sensor that contains a
dedicated digital modules collection and thetemperature and humidity sensing technology
9
are applied to ensure that the product has high reliability and excellent long-term stability.
Soil moisture is basically the content of water present in the soil. This can be measured
using a soilmoisturesensor which consists of two conducting probes that act as a probe. It
can measure the moisture content in the soil based on the change in resistance between
10
the two conducting plates.When there is more water,the soil will conduct more electricity
which means that there will be less resistance. Therefore, the moisture levelwill be higher.
Dry soil conducts electricity poorly, so when there will be less water, then the soil will
conductless electricity which means that there will be more resistance. Therefore, the
moisture level will be lower. This sensor reminds the user to water their plants and also
monitors the moisture content of soil. It has been widely used in agriculture, land
11
CHAPTER 5
SYSTEM ANALYSIS
12
5.2 USECASE DIAGRAM
13
5.3 ARCHITECTURE DIAGRAM
14
CHAPTER 6
CODING
6.1 ALGORITHM
//LINEAR REGRESSION
Step 1: Start
mmean(y)-b*mean(x)
ypredmx+b
15
Step 9: adjust the slope coefficient to minimize RMSE error
Step 11: plot the line with new predicted y values against x values
16
6.2 PROGRAMS
6.2.1 ARDUINO
#include <dht.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiAP.h>
#include <ESP8266WiFiType.h>
#include <WiFiClient.h>
#include <WiFiClientSecureBearSSL.h>
#include <WiFiServer.h>
#include <WiFiUdp.h>
#include "ThingSpeak.h"
#include "secrets.h"
#include <ESP8266WiFi.h>
WiFiClient client;
dht DHT;
17
#define DHT11PIN 5
void setup() {
Initialize serial
WiFi.mode(WIFI_STA);
Initialize ThingSpeak
void loop() {
If Wi-Fi is connected
If it is not connected
Connect to WPA/WPA2 network. Change this line if using open or WEP network
delay(5000);
Print connected
intchk = DHT.read11(DHT11PIN);
readsoil_moisture frompin A0
readthe.humidity value
18
Print the temperature
delay(1000);
if (x == 200) {
else {
SECRET FILE
19
6.2.2 LINEAR REGRESSION
import pandas as pd
importmatplotlib.pyplot as plt
sample=df['SAMPLES'].values
sample=sample.reshape(-1,1)
print sample
digital=df['DIGI'].values
digital=digital.reshape(-1,1)
print digital
model = regression.fit(sample,digital)
y_pred = regression.predict(X_test)
plt.show()
20
Fig 6.1 Output of Linear Regression
21
6.2.3 DEEP LEARNING
importmatplotlib.pyplot as plt
importnumpy as np
import pandas as pd
x=dataset.iloc[:,:-1].values
y=dataset.iloc[:,-1].values
print(x)
y=y.reshape(-1,1)
scaler_x = MinMaxScaler()
scaler_y = MinMaxScaler()
print(scaler_x.fit(x))
xscale=scaler_x.transform(x)
print(scaler_y.fit(y))
yscale=scaler_y.transform(y)
model = Sequential()
22
model.add(Dense(8, activation='relu'))
model.add(Dense(1, activation='linear'))
model.summary()
verbose=1,validation_split=0.25)
print(history.history.keys())
# "Loss"
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.show()
Xnew =
np.array([[0.3000,16.0000,12.0000],[0.3181,16.3289,12.5570],[0.3362,16.6577,13.1141],
[0.3544,16.9866,13.6711],[0.3725,17.3154,14.2282],[0.3906,17.6443,14.7852],[0.4087,1
7.9732,15.3423],[0.4268,18.3020,15.8993],[0.4450,18.6309,16.4564],[0.4631,18.9597,17
.0134],[2.2752,51.8456,72.7181], [3,65,95]])
ynew = (model.predict(Xnew))
ynew=ynew/2.0
print(ynew)
23
fig 6.2 Output of Deep Learning
24
6.2.4 TIME SERIES FORECASTING
import pandas as pd
importseaborn as sns
importmatplotlib.pyplot as plt
fore = pd.read_csv('forcast.csv',
parse_dates=['Month'],
index_col='Month',
date_parser=lambda d: \
pd.datetime.strptime(d, '%Y-%m'))
print(fore)
fore_trend = fore_decomp.trend
fore_seasonal = fore_decomp.seasonal
fore_residual = fore_decomp.resid
ts = fore-fore_seasonal
tsdiff = ts.diff(1)
mares = model.fit()
mares.plot_predict(start='2011-12-01', end='2050-01-01',alpha=0.10)
plt.legend(loc='upper left')
sns.despine(ax=plt.gca())
plt.xlabel('Year')print(mares.aic, mares.bic)
25
Fig 6.3 Output of Time Series Casting
26
CHAPTER 7
TESTING
Unit testing involves the design of test cases that validate that the internal program logic
is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit
before integration. This is a structural testing, that relies on knowledge of its construction
and is invasive. Unit tests perform basic tests at component level and test a specific
business process, application, and/or system configuration. Unit tests ensure that each
performs accurately to the documented specifications and contains clearly defined inputs
TEST ID UTST-01
UNIT TESTED Input values (EC, temperature, humidity)
PURPOSE To identify the Phosphorous content
PRE-REQUIREMENTS Should be in .csv format
TEST DATA Set of sensor values and EC
TEST STATUS Pass
TEST RESULT Phosphorous content has successfully
measured
27
7.2 INTEGRATION TESTING
theyactually run as one program. Testing is event driven and is more concerned with the
basic outcomeof screens or fields. Integration tests demonstrate that although the
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user
manuals.
Business process flows;data fields, predefined processes, and successive processes must
28
CHAPTER 8
The proposed method uses Deep Learning techniques which gives improved efficiency
is very much effective in this architecture.The technology growth paves a major role in
this area. This strategy considers that soil respiration rates during the day are affected by
forecasting method the feature phosphorus also planned to predict. Cost wise low priced
29
CHAPTER 9
REFERENCES
grazing fields,” Computers and Electronics in Agriculture, vol. 74, no. 2, pp. 258–264,
2010.
with Irrigation Valve Control,” Computers and electronics in agriculture, vol. 96, pp. 13–
22, 2013.
“Automated irrigation system using a wireless sensor network and GPRS module,” IEEE
decision support for water saving in agriculture,” IEEE Sensors J., vol. 17, no. 13, pp.
30
7. R. G. Vieira, A. M. da Cunha, L. B. Ruiz, and A. P. de Camargo, “On the design of a
long range WSN for precision irrigation,” IEEE Sensors J,, vol. 18, no. 2, pp. 773–780,
Jan. 2018.
“Wireless sensor network with perpetual motes for terrestrial snail activity monitoring,”
IEEE Sensors J., vol. 17, no. 15, pp. 5008–5015, Aug. 2017.
9. F. Viani, M. Bertolli, and A. Polo, “Low-cost wireless system for agrochemical dosage
reduction in precision farming,” IEEE Sensors J., vol.17, no. 1, pp. 5–6, Jan. 2017.
10. T. Ruan, Z. J. Chew, and M. Zhu, “Energy-aware approaches for energy harvesting
powered wireless sensor nodes,” IEEE Sensors Journal,vol. 17, no. 7, pp. 2165–2173,
April 2017.
31
32