You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/309614330

Agricultural crop predictor and advisor using ANN for smartphones

Conference Paper · February 2016


DOI: 10.1109/ICETETS.2016.7603053

CITATIONS READS

16 1,256

2 authors, including:

Ravichandran Giritharan
Tamilnadu Police
8 PUBLICATIONS   29 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Semantic segmentation of biomedical images using deep learning View project

Retinal Image Processing View project

All content following this page was uploaded by Ravichandran Giritharan on 15 February 2019.

The user has requested enhancement of the downloaded file.


Agricultural Crop Predictor and Advisor using ANN
for Smartphones
Giritharan Ravichandran Koteeshwari R S
UG Student, Assistant Professor & Head of the Department,
Department of ECE, Department of ECE
E.G.S.Pillay Engineering College, E.G.S.Pillay Engineering College,
Nagapattinam, India. Nagapattinam, India.
rvenkkatprabu@gmail.com rskoteeswari@egspec.org

Abstract— Agriculture is one of the most important stream based


on which a country’s economy is decided. But unfortunately
today we see that the sector of agriculture is gradually coming
down due to various factors. One of the drastic factor is that the
“Crop Loss”. In many cases the crop loss is due to the illiteracy
of the farmers. Hence to resolve this problem, a system has been
proposed which guides the farmers to understand the status of
the land and to make them aware of the crops that could benefit
them. This proposed system uses the Artificial Neural Network,
which is one of the most effective tool in modeling and prediction.
There are various parameters that decide the crop productivity.
Hence these parameters are considered as the input for the
proposed system and based on the manipulation with these
inputs, the desired output must be produced. The parameters
include pH, phosphate, potassium, nitrogen, depth, temperature, Figure 1. Graph showing the drop in agricultural sector contribution to GDP
rainfall. Also the proposed system suggests some fertilizers that (Courtesy: Wikimedia Commons)
could improve the productivity. Since the system developed
should be portable and easy to be used by a common man, the
system is developed as an Android Application, which could be
installed in a Smart Phone and could be easily checked out. The
overall accuracy of the proposed prediction system is 90%.

Keywords—Artificial Neural Network, Feed Forward Back


Propogation, Android Application, Eclipse IDE.

I. INTRODUCTION
India is an Agricultural Nation. Almost majority of the
Indians traditional occupation is agriculture. Many of them
worship their land as the god. It is one of the prominent
factor that decides the economy of our country. Government
is also facilitating farmers with many features such as subsidy
in fertilizers, cancellation of their interest for loans etc. But
today the farmers are adversely affected by the crop loss.
Now a days there are variety of reason for the crop loss.
One of the most important factor is that there is no proper
literacy for farmers about the crops, fertilizers and productivity.
Also due these factors, the crop loss has increased and hence
the famers suicide has increased and the employment status in
Agriculture field has gradually decreased as shown Figure 2[1].
The drop in employment sector in the agricultural field is
shown in Figure 1[2].
Hence to aid them help in the technological point of view, a
prediction system is proposed that could intake the various
parameters that decide the productivity[3].
Figure 2. Report on Farmer’s suicide rates (Courtesy: The Hindustan Times)

978-1-4673-6725-7/16/$31.00 ©2016 IEEE


Since linear systems aren’t capable to resolve many Basically an ANN model has three different layers. They
problems, the Artificial Neural Network is utilized. The include
prerequisite of intelligent system using ANN has lead to a next
mile stone in agricultural researches[15]-[17]. a. Input Layer

The ANN has played a crucial role in developing various b. Hidden Layer
models. This article uses the most prominently used ANN, c. Output Layer
Feedforward Back propagation network.
The nodes are present in input layer as well as the output
The basic principle behind the operation of the proposed layer that corresponds to the variables at the input and output.
system is to take the inputs as various parameters that decide Here across the weighted connections the data traverses
the productivity, process them based on the algorithm provided between these nodes.
by ANN, and predict the suitable crop for the land. Also the
system suggests some fertilizers that could be used to improve In this particular model of propagation mechanism, each
the fertility. It also provides the Status of productivity of a node is excited by the previous node, and a weighted sum of all
particular crop in a particular soil. its inputs, t is calculated as follows:

In order to make this system accessible to common people, n


the proposed system is made as an Android Application, where
the user could feed the inputs, and obtain the desirable
t i = ∑Wij X j (1)
application. j −1

II. PROPOSED MODEL Here


n - number of inputs,
A. Artificial Neural Network
w - weight of the connection between ith and jth node, and
Human brain is something different that is capable of x - input from node j.
analyzing the situation based on the data and is capable to Here to calculate the output of the node, a transfer
make decisions based on training. Similar to the human brain a
function is applied to the weighted value t and it is given as
prototype is developed which is capable of taking decisions
with the inculcated artificial intelligence. It is made possible Oi:
by series of training given to that particular system. Since Oi = f(ti) (2)
ANN is formed from simulated neurons, the function of ANN
is similar to that of Human Brain.
The following diagram shows the representation of a three
The functions of ANN is similar to the functions of the layer ANN.
Human Brain. Human brain is one of the most complicated
part of a human body that uses the intelligent approach in
decision making. One such methodology is used here to
implement the decision making in practical cases.
In human brain, the electrical signal is transmitted through
the neurons with the help of the strand called axons. The end of
the each branch contains a synapse.
The processing of information in neural network is done by
different methodologies. Here the Non-linear algorithm called
Feed forward propagation is implemented[4].

B. Feedforward Backpropogation
One of the most commonly used algorithms or networks in
Artificial Neural Network is Feedforward Back Propagation
Network.
In this particular context, the above network is used
together to implement the Artificial Neural Network.
The neural process and recall patterns is done through the
Feedforward algorithm. The training to the proposed neural
network is given using the back propagation network. The
backpropogation is a supervised training methodology[11]- Figure 3. Layer connection of Fedforward back propogation network
[13].
III. DESIGN FLOW Step 5: Since the system is to be developed as the Android
The process of developing the proposed system involves application, the Matlab code of the system is extracted.
the following process: Step 6: The front panel of the Application is developed using
1. Data collection/ Preparation Eclipse IDE, and the Java program written at the backend.
2. Build the Prediction Model Step 7: Finally extract the application in the APK(Android
3. Classification Package Kit) format, so that it can be installed in a smart phone
4. Fertilizer suggestion for respective crop. and utilized.

All the details regarding the crops are collected from the TABLE I. DATABASE CONSIDERED FOR PREDICTION SYSTEM
Department of Agriculture and Science, Annamalai University
and Kishore Vigyan Agriculutral University which is shown in Rainf
Table I. pH N P K Depth T Crop
all

26- 750-
IV. BUILDING THE MODEL 7.2-8.4 110 45 50 20-30
32 1200
Cotton

The building of the Prediction and analyzing model using 25- 700- Sugar
6.3-7.6 175 100 100 40-60
Artificial Neural Network is divided into the following steps. 50 1200 Cane
24- 850-
Step 1, It is necessary to combine many different 5.8-8.5 85 35 45 5-20
29 100
Jowar
Artificial Neural Network (ANN) Prototypes, to find out the 29- 350-
optimal configuration. Hence certain algorithms were used for 7.2-8.6 50 25 20 15-25
32 750
Bajra
training this particular model such as Silva and Almeida’s 26- 750-
algorithm, Delta-bar-delta, Rprop, The Dynamic Adaption 6.5-7.8 25 70 20 15-20 Soybeans
34 1000
algorithm, Quickprop, QRprop[5],[7]-[9]. 14- 400-
7.1-8.4 90 25 10 20-50 Corn
28 600
Step 2, Trial and error method is used to decide the number
of hidden layers. Also certain value of training parameters are 15- 50-
6.2-8.6 100 50 50 15-25 Rice
24 200
obtained through the same method. A very careful observation
20- 800-
is needed to select the number of hidden layers. 5.4-8.5 110 50 50 5-20
25 1400
Wheat

Hence different networks with different number of 6.1-7.8 30 50 50 20-30


25- 600- Ground
neurons at middle layer is used and comparison is made 28 1200 Nut
between the results. Here the comparison is made and best
result is selected using Root Mean Square Error (RMSE) and Feedforward back propagation mechanism and its
hence the number of hidden layers is selected. parameters are shown below:
Step 3: By adjusting the momentum to the appropriate ---------------------------------------------------------------------------
value, the network weights and parameters are initialized. 1. Input layers 7
Step 4: The Prediction system is developed by using the 2. Output layer 1
MATLAB platform, ANN Toolbox. 3. Hidden layers 50
4. No. of Iterations 1200
---------------------------------------------------------------------------

TRANSFER FUNTION:
---------------------------------------------------------------------------
{tansig, tansig}
---------------------------------------------------------------------------

TRAINING ALGORITHM:
---------------------------------------------------------------------------
trainlm(Back Propagation Algorithm)
---------------------------------------------------------------------------

LEARNING:
---------------------------------------------------------------------------
Figure 4. Flow chart of prediction model
learngdm
---------------------------------------------------------------------------
Based on the above functions the ANN manipulates the input VII. RESULTS AND DISCUSSION
data and processes the information by linear network at the input
level. Then the information is propagated through the hidden
layers, where the sigmoidal function is applied to the data
processed and the desired result is produced.
Here following functions are used:
a) Sigmoidal function - Hidden and Output layers.
b) Linear function - Input layer.

V. SUGGESTION OF FERTILIZERS
The main objective of the proposed system is to suggest
crops to the farmer for his land. But there is an alternate case
in which a farmer want to use his own desired crop into his
field. In such controversial situation the proposed system has
an added advantage of suggesting the fertilizer for his land for
his desired crop. Also it says, whether the desired crop of the
farmer, can yield productivity or not.
Here Nitrogen, Phosphor and Potassium are the three
basic important minerals for a crop growth and hence the
fertilizer suggestion is based on these three values. If there
is the optimum availability of these basic nutrition in the soil, then
no fertilizers are required. When there occurs the deficiency
of nutrients then the fertilizers are suggested based on the
Table II.

TABLE II. SUGGESTED FERTILIZERS FOR RESPECTIVE NUTRIENTS


DEFICIENCY
Figure 5. Template of Proposed Prediction System using Eclipse IDE
S. No Deficiency Suggested Fertilizers
Urea,
1. Nitrogen Ammonium Sulphate,
Sodium Nitrate.
Calcium Hydrogen
Phosphate or
Superphosphate,
2. Phosphorous
Ammonium Hydrogen
Phosphate or ammophos,
Ammonium Phosphate
Potassium Nitrate or
Potassium Sulphate,
3. Potassium
Potassium Chloride,
Potassium Sulphate.

VI. FEATURES OF PROPOSED SYSTEM


The developed application has four basic features. They
include:
1. Provides suitable crop for the particular soil.
2. Reveals the productivity detail of the desired crop in
that particular soil.
3. Fertilizers that are necessary to improve the
productivity furthermore.
Hence the system or application can be used in either way
to check the suitable crop for the soil or to obtain the
productivity status of the desired crop in the particular land.
The only input to obtain these results is the latest soil test
report along with the rainfall details.

Figure 6. Input parameters fed to the prediction system


The Figure.5, Figure.6, Figure.7, Figure.8 shows the
representation of the working model in a smart phone. Here
Figure.5 is the opening screen of the Application where the
input data is to be fed with. Once the data is filled and Go
Button is pressed. It asks whether the test is needed to be
performed or training is needed to be performed. Once the
testing option is pressed, in the next screen it shows the
suggested crop suitable for the land as shown in Figure 7. In
the next screen, the user can type the desired crop, and select
Go option. Once it is done, the app shows the productivity
status, Fertilizers necessary to improve the productivity which
is shown in Figure 8.

TABLE III. PREDICTED CROPS BY THE SYSTEM FOR VARIOUS INPUT


PARAMETERS

Rain Crop
pH N P K Depth T
fall Predicted

8.0 95 48 45 35 30 800 Cotton

6.8 70 50 30 25 25 1000 Groundnut

7.5 80 50 45 20 28 700 Cotton**

6.5 95 45 55 20 23 200 Rice

7.3 45 25 25 10 31 800 Bajra


Figure 7. The system predicts the suitable crop for the land
6.0 120 45 45 50 23 900 Wheat

7.0 25 70 10 20 32 800 Soyabeans

7.2 75 45 35 45 29 900 Jowar

6.9 150 80 80 50 30 850 Sugarcane


**
Highlighted row shows the inputs for which the system prediction is wrong.

Table III show the response of the prediction system


developed for a series of input parameters. Here, totally the
system is fed with 50 different series of inputs and the response
of the prediction system is obtained. The above table shows
some of the sample outputs observed. In the third row, the
response of the prediction system is wrong.
In the third row of the above table, for the inputs fed to the
system, the desired output should be Jowar, but the system
predicted it as Cotton.
It is observed that out of 50 cases of inputs, the system's
prediction goes wrong in 4 cases, and hence the accuracy is
calculated as follows:
----------------------------------------------------------------------
Total number of test cases considered = 50
Number of correctly predicted cases = 46
Number of wrongly predicted cases = 04
Accuracy in Percentage = 92%
Figure 8. System predicting the productivity status for the desired crop and ----------------------------------------------------------------------
suggests fertilizers to improve the productivity.
details about crop diseases, information about micronutrients
90 85 etc. This helps to reduce the crop loss by properly educating
80 82
77 the farmers with the crops details and their requirements. Also
70 73
Performance of the System in %

80
this can further be improved by developing the predicting
70 system as a separate module using Raspberry Pi.
60 55
ACKNOWLEDGMENT
50 45
The authors would like to thank their family and
40 35 management of E.G.S. Pillay Engineering College for their
25 kind support.
30
20 REFERENCES
10 [1] Kunal Purohit. (Jul 21, 2015 ), " 1 in 3 farmer suicides in Vidarbha over
Rs.10,000debt:Study"[Online].Available:https://commons.wikimedia.org/wiki
0 /File:1951_to_2013_Trend_Chart_of_Sector_Share_of_Total_GDP_for_each
_year,_India.png.
10 20 30 40 50 60 70 80 90 100 [2] M Tracy Hunter, (18 July 2014), "File:1951 to 2013 Trend Chart of
Sector Share of Total GDP for each year, India.png"[Online],
Number of Hidden Layers Available:http://www.hindustantimes.com/mumbai/1-in-3-farmer-suicides-in-
vidarbha-over-rs-10-000-debt-study/story-6g5e4B92yLTrAPohoWlmNK.ht
[3] Snehal S. Dahikar, Sandeep V. Rode, Pramod Deshmukh, "An Artificial
Figure 9. System predicting the productivity status for the desired crop and Neural Network Approach for Agricultural Crop Yield Prediction Based on
suggests fertilizers to improve the productivity. Various Parameters", January 2015,vol 4, pp. 94-98.
[4] A,K Jain, J Mao and K,M Mohiuddin "Artificial Neural Networks: A
Here as discussed above the number of Hidden Layers are Tutorial", IEEE Computer, 1996, vol. 29, no. 3, pp.56 -63.
[5] A Tang, C., Quek, G. Ng, GA-TSKfnn; "Parameters tuning of fuzzy
selected by trial and error method. The Figure 9 shows the neural network using genetic algorithms", Expert Systems with Applications,
performance of the system for different number of Hidden 2005, pp. 769-781. "
Layers. From the above figure, we can observe the tradeoff [6] H. Ozturk, H. Ceylan, Q.E. Canyurt, A. Hepbasli, "Electricity estimation
between performance and complexity, with respect to the using genetic algorithm approach: a case study of Turkey", Energy, 2003,
Number of Hidden Layers. pp.1003-1012.
[7] F. Cavallaro, "Fuzzy TOPSIS approach for assessing thermal-energy
With increase in the Number of Hidden Layers, the storage in concentrated solar power (CSP) systems," Applied Energy. Oxford,
Performance increases along with the complexity. Hence to 2010, vol. 87, pp. 496-503.
[8] T. C. Chu and Y. C. Lin, "An interval arithmetic based fuzzy TOPSIS
resolve the tradeoff between these parameters, the optimum model," Expert Systems with Applications. Oxford, 2009, vol. 36, pp. 10870-
number of Hidden Layers is chosen by Trial and Error method, 10876.
and the obtained value is 50 at which the performance of the [9] Y. M. Wang and T. M. S. Elhag, "Fuzzy TOPSIS method based on alpha
system is 70%. level sets with an application to bridge risk assessment", Expert Systems with
Applications. Oxford, 2006, vol. 31, pp. 309-319.
VIII. CONCLUSION [10] Trigg HCE, "An Investigation of Methods to Enhance the Performance
of Artificial Neural Networks Used to estimate ICU Outcomes," MScE
From the above results it is clearly identified that the Thesis, U. of New Brunswick, January 1997.
[11] G.-B. Huang, "Learning capability and storage capacity of two-hidden-
proposed system functions properly on the input data, layer feedforward networks", IEEE Trans. Neural Networks, 2003 vol. 14,
manipulates it and provides the desirable output. The Matlab no.2, pp. 274-281, DOI: 10.1109/TNN.2003.809401
ANN Toolbox is the software domain in which the prediction [12] Sperduiti and A. Starita, "Speed up learning and network optimization
system is built and then imported to Android platform. with extended backpropagation", Neural Networks, 1993, vol. 6, pp. 365-383.
[13] G.-B. Huang and H. A. Babri, "Upper bounds on the number of hidden
Also the system is tested with some standard inputs and neurons in feedforward networks with arbitrary bounded nonlinear activation
verified for its results. The accuracy of the system is very high functions", IEEE Trans. Neural Networks, 1998, vol. 9, no. 1, pp. 224-229.
as discussed in the Results and Discussion session. One of the [14] Holger Schulze, Achim Spiller, "The Use of Artificial Neural Networks
as Information Systems in the Food Chain Management:An Empirical
most advantageous factor is that this particular system is there Comparison of Methods, Computers in Agriculture and Natural Resources",
is no cost for this particular system, and it can be installed in 4th World Congress Conference, Proceedings of the 24-26 July 2006, pp. 23-
any smart phones, which makes this system more comfortable 25, DOI: 10.13031/2013.21967
for usage. Also the farmers are accessible to these systems, [15] Yumei Shi, "Grey Model of Total Power of Agricultural Machinery of
and hence they would be properly educated regarding which Construction Corps in Xinjiang Autonomous Region", Agricultural
Machinaztion in Xinjiang, 2006, pp.31-32.
crop to grow, and which not to grow. [16] B.A. Smith et al, "Artificial Neural Networks for Automated Year round
The future work of this involves building this particular Temperature Prediction", Transaction on Computers and Electronics in
Agriculture, 2009, pp. 52–56.
application in the regional languages, so that it would be more [17] B. Ji et al, "Artificial neural networks for rice yield prediction in
comfortable for farmers as many of them are illiterates. mountainous regions", Journal of Agricultural Science, 2007, pp. 249–261.
Further it can be improved by adding certain add-ons such as

View publication stats

You might also like