Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Niharika V, Sachin B Athani, Sourabh S Dolli, Kiran K N
DOI Link: https://doi.org/10.22214/ijraset.2022.46222
Certificate: View Certificate
Primary source of Indian livelihood is Agriculture. It has become a strenuous task for the farmers to plan the crops for the next season as it is a critical prediction about the prices that their harvest might yield in that particular season that will be based on driving weather conditions. This in turn results in imprecise prediction of crop prices by farmers which leads in choosing the fallacious crops or in quickly sell their yield resulting in low revenue. The same crop would have gained more value in the future. This paper mainly aims at addressing these issues by using Machine learning algorithms where the input is given through the sensors as live data and the result is displayed on a webpage. The webpage consists of a recommendation engine and the price prediction data of each crop in that particular region.
I. INTRODUCTION
About 58% of the Indian population depends on farming. Indian agriculture uses a subsistent method of farming where its primary goal is to provide food and other requirements for its vast population. In recent times, farming is commercializing and becoming market oriented which is attracting a greater number of farmers and gaining popularity in developed areas. There are numerous problems that Indian farming suffers from such as unscientific methods of farming, less lucrative prices for agricultural products, lack of irrigational facilities, less usage of chemical, bio and natural fertilizers, vulnerability to disease and pests etc [4].
For agrarians, harvesting flexile (versatile) species is a predominant business. Satellite field monitoring and online software with data interpretation like EOS Crop Monitoring plays a significant role. Backdated survey manifests historically efficient types of crops for a particular area while precise application of fertilizers, field zoning, suggested crop rotation aid in saving input costs [1]. India has made significant progress in food security system.
Food-grain production is more than quadrupled while Indian population is tripled in number. Due to significant fluctuation in the prices after the harvest, farmers tend to face tremendous losses. Due to price fluctuations of agricultural products, the country’s GDP is affected.
To make an intuitive choice before harvesting, evaluation and price estimation of crops are extremely important. By speculating the price of a crop helps in minimizing the risk of loss and balancing the price fluctuations [11]. This model mainly focuses on the technical facet; To help the farmers plan for crops for the next season by predicting the price metric, to grow crops that will yield a good harvest and to reduce economic losses for farmers.
II. RELATED WORK
India manifests diversity of crops. At times 4-5 crops are cultivated simultaneously in the same field which ensures crop production during unfavourable weather conditions. And this in turn reduces the production output and per hectare yield. Machine learning is used to conduct a pilot study for forecasting the sample price of the selected crops beforehand using machine earning at 14- and 30-days intervening period at the selected Mandis across Madhya Pradesh and to analyse the accuracy of the price forecasts at different time intervals and determine the confidence levels for the accuracy of the same [2].
Using Ensemble model, India's Rabbi crop prediction is implemented. An ensemble machine learning model is developed, using previous forecast on weather conditions. [10].
Different crop prices are predicted by analysing the WPI data and previous rainfall. Supervised machine learning algorithm is implemented to analyse the price for the most recent data and evaluate the price for the next 12 months. [11].
III. DESCRIPTION
In unsupervised learning, the existing data is priorly labelled and knows which behaviours needs to be predicted in the new data obtained [3].
Random forest is a Supervised Machine Learning Algorithm that is used widely in Classification and Regression problems. Decision trees are built on different samples and takes their majority vote for classification and average in case of regression [9].
The block diagram of the model is shown in Fig 1. The real time data is collected from the Soil NPK sensor in the web interface. The data collected are the parameters that are considered for prediction. Later it is sent to the cloud recommendation engine where the best crop for that particular parameter is given as the output. Based on the best suited crop for that region the price for that crop is predicted in the price prediction model, where the data of all the crops is collected in terms of its market price and is used as the static data for price prediction [7].
Based on both recommendation engine and price prediction model the price for all the crops that are suited for that region is given as the output with its price. This result is represented in terms of graphical representation and is displayed on the webpage. This graphical representation consists of the crops that are best suited for that region considering all the parameters like weather and soil properties of that region, and also looking into the future demand and market value. It also contains the predicted price of all the best suited crops.
A. Procedure for Model Building
B. Crop Recommendation Algorithm
C. Crop Price Prediction Algorithm
Base array: It is a value assigned to a particular crop to which the predicted value is multiplied to get the Prediction price of crop commodity_dict consists of path to map csv files of the commodity to crop name.
The design of the working model is shown in the figure 2. NPK is connected to the Arduino through the TTL 485 Modbus. This helps convert the 16-bit HEX values into analogue values which can be understood by the microcontroller. the pH sensor is directly connected to the Arduino through an analogue pin. The NodeMCU and Arduino are connected with Rx Tx pins that help establish serial communication.
The reason for using both the controllers is that NodeMCU had only 1 analogue pin where in Arduino has 6. As there is need of multiple analogue pins both the boards are used to integrate the sensor and send the data to the server.
Here the website acts as the interactive interface of the project with the user. Different data like Temperature, Humidity, pH and NPK value of the soil is continuously read by the sensor with the particular interval. These parameters help in the understanding of soil property and environment with which we predict the crop. The data read is continuously sent to the ThingSpeak through Wi-Fi and stored in the database. When the data is requested from tree webpage, the recent data of the database is sent to the recommendation Engine for prediction. We have taken a set of static data for prediction of the crop and price. The static data of recommendation engine contains values of the parameters such as Temperature, Humidity, pH and NPK along with it has the crop grown for those particular values. For prices we have taken data of the price of a crop in the particular month of the year. So, depending on when the crop is harvested the price of the crop in that particular month is predicted. So once the data is fed into the recommendation engine the best crop is predicted using random forest algo. The result of the same is given as the input for the price prediction algo when the price of the crop is predicted using the decision tree algo. The price predicted is given as the result and then the price of crops in the different months of the year is represented graphically on the web page.
pH is used to measure the pH of soil in the range of 1 to 14. and helps in knowing the fertility of the soil. Arduino is a microcontroller which connects all the sensors through the analogue pin. NodeMCU used here is also a microcontroller which connects to the Arduino gets the data and sends it to ThingSpeak through the Wi-Fi. ThingSpeak is an open source IoT application. Where the channel created in the application has its own API key through which it connects to the IoT device in our case its NodeMCU. The data read from this will be stored in the application. Each channel has its own HTTPS link through which the data can be read. This link is used in the recommendation engine to get the values.
NPK sensor - Helps in getting the NPK value of the soil which plays the major role in the understanding of the soil property. The value read and given to the code is the form of %.
IV. RESULT
The final output will be a Web Application as shown in Figure 3 which is built using Flask. The web application is built using the Flask framework. For the design a frontend framework called materialize css is used. This web application is the combination of crop recommendation model and crop price prediction model. The landing page is complete price prediction analytics of top 5 gainers and top 5 losers. Landing page also includes the star commodity at that time [8].
\
There is a link in home page to connect to a form where the sensor values are displayed which is fetched through sensors. The form loads N, P, K and pH values from the sensor which are updated as the sensor sense a change. When we click on predict button form loads the analytics page where the most suitable crop is recommended for that type of crop under given weather conditions. Here the weather conditions are fetched based on the region and the month. For the weather the static data is taken from the weather forecasting websites [5].
The analytics page contains the predicted crop based on the soil fertility and the climatic conditions of the region that are submitted through the cropgen form. The page also contains the crop tabs clicking on which more details of the crop is shown in both static form in the form of layout displaying the 12 months forecast and graphical representation of the 12-month forecast and previous [6].
A structured machine learning algorithm is implemented to have an interactive interface to the end users. This model mainly focuses on anticipating accurate prices of the crops, forecasting on the webpage that is created using flask web application which is affable to farmers. The training datasets bring forth an intuitive depth in predicting the current market value for the crops recommended in the model.
[1] ShieldSquare Captcha. (2021). Iopscience. [2] http://www.aiggpa.mp.gov.in/uploads/project/Crop_price_predictions_using_machine _learning_in_MP-_A_pilot_study [3] https://www.itmconferences.org/articles/itmconf/pdf/2021/05/itmconf_icacc2021_030 40 [4] Kiran M. Sabu, T.K. Manoj Kumar, Predictive analytics in Agriculture: Forecasting prices of Arecanuts in Kerala, Procedia Computer Science, Volume 171, 2020, Pages 699-708, ISSN 1877-0509 [5] Jaikla, R., Auephanwiriyakul, S., & Jintrawet, A. (2008, May). Rice yield prediction using a support vector regression method. In 2008 5th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (Vol. 1, pp. 29-32). IEEE. [6] Yung-Hsing Peng, Chin-Shun Hs and Po-Chuang Huang,“Developing Crop Price Forecasting Service Using Open Data from Taiwan Markets,”IEEE 2017. [7] M.C.S.Geetha , “A Survey on Data Mining Techniques in Agriculture, ” Journal of Innovative Research in Computer and Communication Engineering, Feb 2015. [8] Vinciya, P., and Dr A. Valarmathi., “Agriculture Analysis for Next Generation High Tech Farming in Data Mining” (IJARCSSE) (2016). [9] Md.Tahmid Shakoor, Karishma Rahman, Sumaiya Nasrin Rayta, Amitabha Chakrabarty,“Agricultural Production Output Prediction Using Supervised Machine Learning Techniques,” IEEE 2015. [10] International Journal of Recent Technology and Engineering (IJRTE). (n.d.-b). https://www.ijrte.org/b70270711222/. Retrieved July 2020, from https://www.ijrte.org/wp-content/uploads/papers/v8i2/B2220078219. [11] Dhanapal, R., AjanRaj, A., Balavinayagapragathish, S., & Balaji, J. (2021). Crop price prediction using supervised machine learning algorithms. Journal of Physics: Conference Series, 1916(1), 012042. https://doi.org/10.1088/1742-6596/1916/1/012042
Copyright © 2022 Niharika V, Sachin B Athani, Sourabh S Dolli, Kiran K N. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET46222
Publish Date : 2022-08-07
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here