67
DEDAN KIMATHI UNIVERSITY OF TECHNOLOGY FINAL PROJECT DOCUMENTATION FOR FINAL YEAR PROJECT BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY BY WALUCHO BRIAN A. C025- 0184/2010 PROJECT TITLE: MOBILE SYSTEM FOR HORTICULTURAL DISEASE AND PEST DIAGNOSIS SUPERVISOR: MR CYRUS KAMAU 1

plant Diagonistic Expert system

Embed Size (px)

DESCRIPTION

Expert system for farmers

Citation preview

Page 1: plant Diagonistic Expert system

DEDAN KIMATHI UNIVERSITY OF TECHNOLOGY

FINAL PROJECT DOCUMENTATION FOR

FINAL YEAR PROJECT

BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

BY

WALUCHO BRIAN A.

C025-0184/2010

PROJECT TITLE:

MOBILE SYSTEM FOR HORTICULTURAL DISEASE AND PEST DIAGNOSIS

SUPERVISOR: MR CYRUS KAMAU

DATE: 3RD DECEMBER 2013

This report is submitted to Dedan Kimathi University of Technology in partial fulfillment of

the requirements for the award of Bachelor of Science Degree in Information Technology.

1

Page 2: plant Diagonistic Expert system

ABSTRACTMobile based Greenhouse Disease and Pest Diagnosis Expert System is an application that has

been developed for diagnosis of common diseases and pests that affect horticultural crops. The

system will also be used to provide solutions to farmers on pest and disease management.

The system is rule based and uses modular construction for the knowledge base. This means that

the knowledge base for diseases affecting the different plants will be separate from each other.

To develop and apply the system, I have selected three horticultural crops, namely tomato,

spinach and pepper. For these crops, I will develop the relevant knowledge base structure for

pest and disease management.

2

Page 3: plant Diagonistic Expert system

DECLARATIONI hereby declare that the work reported in this document is my own. It has been performed during

my Bachelor of Science Degree in Information Technology, and has not been submitted for

assessment in connection with any other award whatsoever

Name: WALUCHO BRIAN A.

Registration number: C025-0184/2010

Signature: ……………………………….

Date: ……………………………………...

And that this research project has been submitted as part of fulfillment of the requirements for

Bachelors of Science Degree in Information Technology at Dedan Kimathi University of

Technology under the supervision of:

Name : MR CYRUS KAMAU

Signature………………………

Date……………………………

3

Page 4: plant Diagonistic Expert system

ACKNOWLEDGEMENTSSpecial thanks go to the almighty God for His guidance throughout my Campus life.

I would like to thank my supervisor Mr. Cyrus Kamau for his help and guidance throughout this

project.

I would also like to thank my fellow I.T students who have given me advice and answered

questions during the development of this Application. Morfat Ogega, Michael Otieno and

Mutabari Morris have given their undivided support.

Contents4

Page 5: plant Diagonistic Expert system

ABSTRACT....................................................................................................................................................2

DECLARATION..............................................................................................................................................3

ACKNOWLEDGEMENTS................................................................................................................................4

LIST OF FIGURES AND TABLES......................................................................................................................8

CHAPTER 1: INTRODUCTION......................................................................................................................10

Background Study..................................................................................................................................10

Problem Definition................................................................................................................................10

Objectives..............................................................................................................................................11

Project Justification...............................................................................................................................11

General Scope........................................................................................................................................11

CHAPTER 2: LITERATURE REVIEW..............................................................................................................12

Introduction...........................................................................................................................................12

Expert system........................................................................................................................................13

Case Studies of Expert systems in Agriculture......................................................................................14

Expert System for Management of Malformation Disease of Mangoes (ESMMDM).........................14

In-Tech Expert System for Greenhouse Management.......................................................................15

National Animal Disease Referral Expert System (NADRES)..............................................................16

CHAPTER 3: METHODOLOGY.....................................................................................................................17

Data Collection Methodology................................................................................................................17

Questionnaires..................................................................................................................................17

Interviews..........................................................................................................................................17

Development Methodology...................................................................................................................18

Requirements Definition....................................................................................................................18

Analysis..............................................................................................................................................18

Design................................................................................................................................................18

5

Page 6: plant Diagonistic Expert system

Coding................................................................................................................................................19

Testing...............................................................................................................................................19

Acceptance........................................................................................................................................19

CHAPTER 4: ANALYSIS AND DESIGN..........................................................................................................20

Introduction...........................................................................................................................................20

Requirements Analysis:.........................................................................................................................20

Functional Requirements...................................................................................................................20

Nonfunctional Requirements.............................................................................................................20

System analysis......................................................................................................................................20

Interview Analysis..............................................................................................................................20

Questionnaire Analysis......................................................................................................................23

System Analysis.....................................................................................................................................30

Introduction.......................................................................................................................................30

Context Diagrams..............................................................................................................................30

Use Case Diagrams............................................................................................................................31

Activity Diagrams...............................................................................................................................33

Database Design................................................................................................................................34

Preliminary User Interface Design.....................................................................................................36

CHAPTER 5: TESTING AND RESULTS...........................................................................................................39

Test data................................................................................................................................................39

Deployment Design...............................................................................................................................42

CHAPTER 6: DISCUSSIONS AND CONCLUSIONS.........................................................................................43

Introduction...........................................................................................................................................43

Discussion..............................................................................................................................................43

Diagnosis of diseases.........................................................................................................................43

6

Page 7: plant Diagonistic Expert system

Viewing of reports by the experts and the administrator..................................................................43

Limitations.............................................................................................................................................43

Conclusions............................................................................................................................................43

Recommendations.................................................................................................................................44

CHAPTER 7: REFERENCES AND APPENDICES.............................................................................................45

References.............................................................................................................................................45

Appendix A............................................................................................................................................46

Questionnaire....................................................................................................................................46

Interview...........................................................................................................................................48

Appendix B............................................................................................................................................49

Coding Standard................................................................................................................................49

7

Page 8: plant Diagonistic Expert system

LIST OF FIGURES AND TABLESFigure 1 Waterfall Model...........................................................................................................................19

Figure 2: Adequacy of information............................................................................................................21

Figure 3: Farmers' View on expert system.................................................................................................21

Figure 4: Mobile system vs online system.................................................................................................22

Figure 5: Willingness to use the system.....................................................................................................23

Figure 6: Farmers’ Place of Farming..........................................................................................................24

Figure 7: Farmers who grow Tomatoes.....................................................................................................24

Figure 8: Farmers who grow pepper.........................................................................................................25

Figure 9: Farmers who grow spinach.........................................................................................................25

Figure 10: Most common symptoms in tomatoes.....................................................................................26

Figure 11: Most common symptoms in spinach........................................................................................26

Figure 12: Most common symptoms for pepper.......................................................................................27

Figure 13: Farmers with mobile phones....................................................................................................28

Figure 14: Phones which are internet enabled..........................................................................................28

Figure 15: Proportion of operating systems..............................................................................................29

Figure 16; Farmers willing to use the system............................................................................................30

Figure 17: Context diagram representing mobile system for horticultural disease diagnosis...................31

Figure 18: Use case diagram for disease Diagnosis....................................................................................31

Figure 19: Use Case diagram for expert.....................................................................................................32

Figure 20: Use case diagram for administrator..........................................................................................32

Figure 21: Activity Diagram for Disease diagnosis.....................................................................................33

Figure 22: Experts’ Activity Diagram for adding a disease to the knowledge base....................................33

Figure 23: Activity diagram for administrator to add experts....................................................................34

Figure 24: Home page showing the different diseases to be diagnosed....................................................36

8

Page 9: plant Diagonistic Expert system

Figure 25: Interface for experts for adding diseases to the knowledge base............................................37

Figure 26: Interface for adding a disease for tomato fruit.........................................................................38

Figure 27: Diagnosing a tomato fruit disease............................................................................................39

Figure 28: Output......................................................................................................................................40

Figure 29: Adding a disease.......................................................................................................................41

Table 1: Interview Questions.....................................................................................................................17

Table 2: Table for tomato fruit diagnosis...................................................................................................34

Table 3: Table for spinach Diagnosis..........................................................................................................35

9

Page 10: plant Diagonistic Expert system

CHAPTER 1: INTRODUCTION

Background StudyHorticulture is a branch of agriculture that involves cultivation of vegetables, fruits and flowers.

Farmers in the horticultural field can either engage in large scale farming for commercial

purposes or engage in farming on a small scale for subsistence use. The farming can also be

traditional, which is dependent on rain, or it can be modernizes using greenhouses where the

plants are grown under controlled conditions so as to achieve high yields. In this project, I have

developed a system for diagnosis of diseases for three categories of horticultural crops namely:

tomatoes, pepper and spinach.

Problem Definition Over the years, horticultural farmers have not been able to access the necessary expertise

required to diagnose the different pests and diseases affecting their plants. Horticultural farmers

have for a very long time had to give up on finding the right diagnosis for their plants. Even in

cases where there is some information on diagnosis of plants, the information is not integrated

into a single place for easy access by farmers. Farmers have had to get information on diagnosis

from sources such as books, agricultural journals and different internet sites so as to diagnose the

most basic diseases affecting their plants.

Mobile based diagnosis system has therefore been developed to address this problem. The

system has a mechanism to allow the farmer to input symptoms, and then the system will output

the disease affecting the plants and provide recommendations.

With the increasing number of people with mobile devices, there is need for mobile based system

for diagnosis of some common horticultural diseases so that people with mobile devices which

support platforms such as android and blackberry can be able to access the diagnosis.

10

Page 11: plant Diagonistic Expert system

Objectives1. To enable horticultural farmers to diagnose some common diseases and pests affecting

horticultural crops by use of mobile devices

2. To provide horticultural farmers with recommendations on how to treat common

horticultural diseases and pests

3. To increase the amount of expertise information and knowledge available to horticultural

farmers

Project JustificationThe mobile based system for diagnosis of horticultural pests and diseases is a mobile based

system which has a mechanism to allow the farmer to input a symptom or problem, and then the

system outputs the disease affecting the plants. The system, in addition provides

recommendations on how to deal with the pests and diseases.

The number of people using mobile phones has greatly increased since the beginning of the 21st

century. Many farmers are therefore able to use their phones for diagnosing plant diseases. That

is why this system has been designed to be used for mobile phones because the system is mobile

based, unlike other systems which have been developed for the same purpose, which are often

online systems. This is in order to cater for the needs of increased number of people using mobile

devices, for example those which run on an android platform.

General ScopeThe system is meant to be used by horticultural farmers to diagnose common pests and diseases

for three types of crops: tomatoes, pepper and spinach.

The system is mobile based, meaning that it can be accessed by users who have smartphones

with the application installed or with internet connection.

11

Page 12: plant Diagonistic Expert system

CHAPTER 2: LITERATURE REVIEW

IntroductionThere are many fields in agriculture having different characteristics, which share a common core

of knowledge. In all occasions, beyond the common core of knowledge, extra specific

knowledge is needed to handle the peculiarities of individual situations. Such applications can be

found in Horticulture for some groups of vegetables, such as tomato, pepper and spinach, where

a common core of knowledge can be identified in their cultivation process.

Application of Expert System in the area of agriculture would take the form of Integrated Crop

Management decision aids and would encompass water management, fertilizer management,

crop protection systems and identification of implements, (Dale, Bridges et al, 1995). In order to

remain competitive, the modern farmer often relies on agricultural specialists and advisors to

provide information for decision-making. An expert system normally composed of a knowledge

base (information, heuristics, etc.), inference engine (analyzes knowledge base), and end user

interface (accepting inputs, generating outputs).

Each knowledge base can be assembled from other knowledge modules regarding to narrower

fields of the same domain. Each autonomous piece of knowledge builds a separate knowledge

base. Using proper tools it is possible to combine different knowledge base modules giving a

new knowledge base, targeting to a broader application field. Thus the same knowledge can be

shared and be reused hence increasing the system efficiency in terms of storage space and

maintenance.

One of the major practices, aimed at increasing harvest in vegetable crops production, is the

elimination of losses by practicing rational pest management, especially in greenhouse where the

different crops serve as stable habitats and hosts for many pests, some of them with high

reproduction rate.

In vegetable crop production, many research works have been done in the field of Integrated Pest

Management and

knowledge about pests has been acquired. However, practical implementation of Integrated Pest

Management research results is far to be completed. One of the reasons is the information gap

12

Page 13: plant Diagonistic Expert system

between research scientists, extension agents and farmers. The aftermath of this lack of

information leads sometimes to the misunderstanding of the pest status, non-identification of the

pest itself and non-accuracy of the recommended measures of control. In attempting to resolve

this problem agricultural experts have been involved in the use of information technologies to

disseminate and implement knowledge by developing computer systems to support decision

making in pest's control.

By far the most Expert Systems (ES) are the decision tools widely used in Integrated Pest

Management. Such a system may completely fulfill a function that normally requires human

expertise, or it may play the role of an assistant to a human decision-maker. ES is able to solve

real-world problem, able to interact with a non-expert user and incorporates new knowledge

about the domain. Although ES have been applied to a variety of agricultural problems since

1980s, the solution of pest management problems appears to have been an area of particular

interest. Its main role is concerned with pest identification, treatment prescription and strategic

planning

An expert system combines a lot of knowledge of so many experts at one point. By helping

people to consider all of the relevant information and by assimilating this information into an

understandable format, Expert System assists people in making of environmentally sound and

economically viable farm management decisions, (G.N.R. Prasad, Dr. A Vinaya Babu, 2006).

Expert systemAn expert system is a computer program that uses artificial intelligence to solve problems within

a specialized domain that ordinarily requires human expertise. Expert systems are designed to

solve complex problems by reasoning about knowledge, like an expert, and not by following the

procedure of a developer as is the case in conventional programming. The first expert systems

were created in the 1970s and then explored more in the 1980s. Expert systems were among the

first truly successful forms of Artificial Intelligence software. It is divided into two parts, one

fixed, independent of the expert system: the inference engine, and one variable: the knowledge

base. To run an expert system, the engine reasons about the knowledge base like a human. In

expert system technology, the knowledge base is expressed with natural language rules in the

form. Expert systems basically encode human expertise in limited domains by representing it

13

Page 14: plant Diagonistic Expert system

using if-then rules. Most successful application of Artificial Intelligence (AI) in decision making

so far is the development of Decision Support System (DSS), particularly expert system, which

is a computer program that acts as a ‘consultant’ or ‘advisor’ to decision makers, (Yang and

Wang, 2005)

Expert systems have been used in a wide range of application areas, majorly in medicine,

agriculture and business fields where a lot of expertise is needed for decision making.

Case Studies of Expert systems in AgricultureThere has been a lot of interest and research in the application of expert systems in agriculture.

The use of expert systems in this field has led to increased availability of expertise in disease

diagnosis in both animals. In pest and disease diagnosis in plants, the expert systems have been

used in specific domains such as horticulture, tree and cash crop farming. The lack of proper

decision support system to disseminate timely, relevant farming advice, has been observed as a

major road block for adopting precision in agriculture, (Howard, Jones and Pierce, 1989)

The following are some examples of expert systems that have been developed for the agricultural

sector

Expert System for Management of Malformation Disease of Mangoes (ESMMDM)

The Expert System for Management of Malformation Disease of Mangoes (ESMMDM) was

developed to predict the disease occurrence and suggest an appropriate crop protection and pest

management strategy. The expert system is based on the information generated from long term

research in both laboratory and field conditions. The expert system reduces the time required to

solve the problem without waiting for an expert advice and hence makes mango cultivation more

efficient and profitable.

This system considers variety of plant, the number of malformed shoots, climatic facts etc and

prescribes suitable treatment package. It is an interactive software tool with graphical user

interface, (Pinaki Chakraborti, Dr. Dilip Kumar Chakraborti, 2008). The ESMMDM expert

14

Page 15: plant Diagonistic Expert system

system considers the variety and the age of the plant, time since the symptoms were first noticed,

the number of malformed shoots, climatic factors, etc. in its diagnosis. The expert system uses a

fuzzy logic based reasoning process to analyze the symptoms and prescribes an appropriate pest

management and crop protection strategy. The disease cycle begins in May and the expert

system prescribes the treatment package for an entire disease year commencing in May.

The ESMMDM expert system is an interactive software tool with a graphic user interface. It asks

some simple multiple choice questions about the test case. A user is required to select one of the

options from an interactive control like a radio button or a drop down list box. Photographs have

been used to help the user to accurately identify the symptoms. At the end of the diagnosis, the

expert system generates a descriptive report of the present case. The report includes the

particulars of the symptoms detected and the crop protection and pest management strategy

prescribed. If required, the report can be printed. The ESMMDM expert system can be used by

extension workers as well as farmers with or without any experience of using computers.

The Prescribed Treatments The ESMMDM expert system prescribes treatment packages composing of physical as well as

chemical processes. Such treatment methodologies are known as integrated pest management in

plant pathological terminology.

In-Tech Expert System for Greenhouse Management

In-Tech Expert System for Greenhouse management is an online based expert system that uses

integrated Pest Control (IPM) in diagnosing pests in greenhouse plants: fruits, vegetables and

flowers.

Its knowledge base is implemented in modules, in such a manner that the knowledge base for

each category of plants is separate from each other.

The expert system is composed of four subsystems which are: The cultivation techniques

subsystem, consultation of pest/disease and nutrient deficiency subsystem, diagnosis of

15

Page 16: plant Diagonistic Expert system

pest/disease and nutrient deficiency subsystem, and environment control decision subsystem.

Under each subsystem, there are still several subsystems.

Modular design method is adopted to configure the expert system and every independent module

is combined by master module. Main modules of the expert system include inference diagnosis

module, database management module, consultation module, decision on environment control,

text browsing module and help module.

National Animal Disease Referral Expert System (NADRES)

This is a classic example of an expert system for the agricultural sector. It is a system developed

for diagnosis of animal diseases in India. As such the innovative NADRES is developed as a web

based dynamic and interactive livestock disease relational database supported by Geographic

Information System (GIS). This software addresses the needs of data collection, transmission,

retrieval, analysis of critical reporting of disease events as and when they occur and useful for

field veterinarians, administrators, technocrats, research personnel, farmers, veterinary colleges

and students.

The system was developed due to the need for accurate information about disease diagnosis for

animals. This was due to the realization that controlling major livestock disease had the potential

to dramatically improve the quality of life of the rural poor.

16

Page 17: plant Diagonistic Expert system

CHAPTER 3: METHODOLOGY

Data Collection Methodology I identified horticultural farmers as the core users of the proposed system. I therefore used the

following data collection methodologies.

Questionnaires

I chose to use questionnaires as one of the tools to gather information about system requirements.

This is because questionnaires allow for one to collect information that is relevant for the project.

It also allowed me to get the respondent’s own views and suggestions on how they would like

the system to be. I issued out questionnaires to farmers in Baringo and Nakuru counties so that

they can give their views on what should be included in the system. I chose the two counties

because they have diverse range of horticultural crops being grown in them. For Nakuru county,

it has both large-scale and small scale horticultural farming, especially in Naivasha, hence I

chose it due to the diversity of horticultural crops being grown there.

Interviews

I interviewed farmers in both Nakuru and Baringo counties to get their views on what the system

should be able to achieve. I chose to use interviews as one of the methods of data collection

because interviews are interactive and they allow for immediate feedback from the respondents.

I asked the following questions

Table 1: Interview Questions

NUMBER QUESTION

1 Do you think there is adequate information about disease diagnosis?

2 Do you think that a knowledge management system will address the problem of lack of enough experts to diagnose common diseases?

3 Do you think a mobile based system is better than other online diagnosis systems?

4 Are you willing to use such a system when developed?

5 What functionalities should be included in a disease diagnosis system?

17

Page 18: plant Diagonistic Expert system

Development MethodologyThis section describes the methodology that was followed in the collection and analysis. It also

outlines the software methodology which I used while developing the system. In this project, I

used the waterfall model.

The waterfall model is a sequential design process, often used in software development process,

in which progress is seen as flowing steadily downwards (like a waterfall) through all the phases.

The waterfall methodology is best suited for projects where the project requirements are static

and would not change over the period of time during the software development life-cycle

(SDLC). It divides the overall project into sequential phases. Emphasis is on planning, time

schedules, target dates, budget and implementation of an entire system at one time.

It involves 6 steps:

Requirements Definition

At this stage, the requirements for the new system are defined. This also involves acquiring

information about existing systems and the kind of improvements that can be incorporated into

the new system

Analysis

It involves analyzing the problem and finding out the best way to solve it. I carried out a background study and found out that there was need to develop a mobile based system for horticultural disease diagnosis.

Design

It involves:

Logical DesignAt this stage, I considered the different tools for system development. I had the option of developing the system using platforms such as android, jquery mobile, visual basic.net and python.

18

Page 19: plant Diagonistic Expert system

Physical DesignIt involves evaluation of the identified technologies and selecting the most appropriate

technology to be used for development. I chose to use jquery mobile because it is platform

independent.

Coding

It involves using the identified technologies to develop the software. I developed the system using php at the back end, and jquery mobile for the user interface.

Testing

At this stage, the system is tested to check whether it performs its required functionality and

whether it conforms to the needs of the target users. I carried out testing and analyzed the results,

as shown in chapter 5

Acceptance

At this stage, if the system conforms to the needs of target users, it is deployed for use. I decided to use parallel deployment technique.

Figure 1 Waterfall Model

I chose to use the waterfall model because it allows for the system to be developed

systematically from one phase to the other. I had to first do the requirements definition, then

analysis, design, coding, testing and finally acceptance of the system by the users. This ensures

that no stage is skipped in the development process, and therefore the development process is

systematic. 19

Page 20: plant Diagonistic Expert system

CHAPTER 4: ANALYSIS AND DESIGN

IntroductionThis chapter entails the analysis of the system and designs of the way the system will look like. It

will show the flow of data and the requirements analysis.

Requirements Analysis:The proposed system will have the following requirements

Functional Requirements

The system should be able to allow farmers to diagnose common diseases affecting horticultural

crops

The system should be able to allow farmers to get information on treatment of common diseases

affecting horticultural crops

The system should allow experts to input information about new diseases

The system should allow the administrator to verify information entered by the experts, and

change the knowledge base accordingly

Nonfunctional Requirements

The application should be easy to access and use

The application should provide security for the data in database. This is by use of passwords

in logging into the system.

System analysis

Interview Analysis

I carried out interviews in both Nakuru and Baringo counties so as to find out the functionalities

to include in the system.

The first question I asked was: Do you think there is adequate information about disease

diagnosis?

20

Page 21: plant Diagonistic Expert system

Figure 2: Adequacy of information

83.33% of the farmers were of the opinion that there is inadequate information about disease

diagnosis. This is because there are very few experts in horticulture. They therefore expressed

the need for a knowledge management system for disease diagnosis

The second question I asked was: Do you think that a knowledge management system will

address the problem of lack of enough experts to diagnose common diseases?

Figure 3: Farmers' View on expert system

21

Page 22: plant Diagonistic Expert system

(100%) 12 out of the 12 farmers that I interviewed were of the opinion that a knowledge

management system will greatly solve the problem of inadequate number of experts.

The third question that I asked was: Do you think a mobile based system is better than other

online diagnosis systems?

Figure 4: Mobile system vs online system

66.67% of the farmers that I interviewed felt that a mobile system would be much better than

other web based systems. This is because most of them have mobile phones which are internet

enabled.

The fourth question I asked was: Are you willing to use such a system when developed?

22

Page 23: plant Diagonistic Expert system

Figure 5: Willingness to use the system

12 out of 12 farmers (100%) expressed their willingness to use a mobile based system for

diagnosis of common horticultural diseases.

The fifth question I asked was: What functionalities should be included in a disease diagnosis

system?

Most farmers suggested that the system should be able to:

1. Diagnose common horticultural diseases

2. Provide recommendations on how to treat those diseases

Questionnaire Analysis

I issued out questionnaires in both Nakuru and Baringo counties so that I can get information on

what to include in the system.

I targeted farmers who grow three kinds of crops namely tomatoes, pepper and spinach.

I issued out a total of 20 questionnaires. The following are the questions which asked.

23

Page 24: plant Diagonistic Expert system

Question one: Where do you carry out your horticultural farming?I needed to know where the farmers carry out their farming so that I can compare the needs of

farmers from the different regions. The following chart represents the residences of the farmers.

Figure 6: Farmers’ Place of Farming

Question 2: Which of the following plants do you grow?

I needed to know which plants the farmers grow. This is to enable me to know which plants to

put much of my effort in developing their knowledge bases. The following chart shows the

proportion of farmers who grow the different crops.

Figure 7: Farmers who grow Tomatoes

24

Page 25: plant Diagonistic Expert system

From the analysis, I found out that 91% of the farmers grow tomatoes. It was therefore necessary

for me to develop a system that would be able to diagnose tomato diseases.

Figure 8: Farmers who grow pepper

From the chart above, I found out that 73% of the farmers grow pepper, therefore it would be

beneficial for me to develop a system to diagnose pepper diseases.

Figure 9: Farmers who grow spinach

25

Page 26: plant Diagonistic Expert system

Question 3: What are the most common symptoms that you usually notice on the plants that you grow?I needed to know the most common symptoms that are manifested in the different plants grown by the farmers. This information was vital in enabling me to come up with knowledge bases for the most common diseases that affect the horticultural crops. The following charts show the representations of the different symptoms that affect the crops

Figure 10: Most common symptoms in tomatoes

From the analysis above, I found out that the most common symptoms for tomatoes were:

wilting, yellow leaves, weak plant, small fruit and dry leaves. This information was useful in

helping me to determine the symptoms to include in the diagnosis for tomato plant diseases.

Figure 11: Most common symptoms in spinach

26

Page 27: plant Diagonistic Expert system

From the analysis above, I found out that the most common symptoms for spinach were: yellow

patches on leaves, wilting of plant, breakage of leaves and black spots on leaves. This

information was useful in helping me to determine the symptoms to include in the diagnosis for

spinach plant diseases.

Figure 12: Most common symptoms for pepper

From the analysis above, I found out that the most common symptoms for pepper were: fruit

distortion, leaf falling, leaf breakage and yellow leaves. This information was useful in helping

me to determine the symptoms to include in the diagnosis for pepper plant diseases.

Question 4: Do you have a mobile phone?

I needed to know the proportion of farmers with mobile phones so that I could know if it is

necessary to develop a mobile system for them.

The following chart shows the proportion of farmers with mobile phones

27

Page 28: plant Diagonistic Expert system

Figure 13: Farmers with mobile phones

From the above analysis, every farmer had a mobile phone, hence it was need for me to develop a mobile based system for disease diagnosis.

Question 6: is your phone internet enabled?I needed to know the number of farmers with internet enabled phones because the system is to be

accessed through the internet. The following chart shows this representation

Figure 14: Phones which are internet enabled

28

Page 29: plant Diagonistic Expert system

From the analysis, I found out that 91% of the farmers had mobile phones which were internet

enabled. Therefore, it was good for me to develop a system which could be accessed via internet.

Question 7: What operating system does your phone run on?

I needed to know the proportion of the different operating systems running on the farmers’

phones so that I could decide on which platform to use in developing the system. The following

chart shows the proportion of the different operating systems running on the farmers’ phones.

Figure 15: Proportion of operating systems

The farmers’ phones had different operating systems. That is why I chose to develop my

application using jquery mobile because it is platform independent, that is, an application

developed on jquery mobile platform can run on a phone with any operating system.

Question 9: Are you willing to use a mobile based system for diagnosis of horticultural diseases once it is developed?I needed to know if the farmers are willing to use the mobile based system for diagnosis of

horticultural diseases. This is because I had identified the farmers as the target users and they had

to be willing to embrace the system for it to be successfully implemented. The following chart

shows this representation

29

Page 30: plant Diagonistic Expert system

Figure 16; Farmers willing to use the system

From the analysis, 100% of the farmers were willing to use the system.

System Analysis

Introduction

Design is the abstraction of a solution; it is a general description of the solution to a problem

without the details. Design is view patterns seen in the analysis phase to be a pattern in a design

phase. After design phase we can deduce the time required to create the implementation.

In this chapter I introduce context diagram, models, system architecture, principal system object,

design model and object interface.

Context Diagrams

The context diagram is a top-level view of an information system that shows the boundaries and

scope. It describes the main objective of the system and the entities involved i.e. the farmer,

expert, the administrator and the database and their relationships. After the analysis of the

existing system I came up with system design. During the design of the system I used data flow

diagrams and context diagrams to depict the scenario of the proposed mobile system for

horticultural disease diagnosis as shown below.

30

Page 31: plant Diagonistic Expert system

Figure 17: Context diagram representing mobile system for horticultural disease diagnosis

Use Case Diagrams

Figure 18: Use case diagram for disease Diagnosis

31

Page 32: plant Diagonistic Expert system

Figure 19: Use Case diagram for expert

Figure 20: Use case diagram for administrator

32

Page 33: plant Diagonistic Expert system

Activity Diagrams

Figure 21: Activity Diagram for Disease diagnosis

Figure 22: Experts’ Activity Diagram for adding a disease to the knowledge base

33

Page 34: plant Diagonistic Expert system

Figure 23: Activity diagram for administrator to add experts

Database Design

Table 2: Table for tomato fruit diagnosis

Field Type Null Default

disease varchar(50) No

yellowleaves Text Yes NULL

blackspots Text Yes NULL

leafrot Text Yes NULL

twistedleaves Text Yes NULL

leavesfalling Text Yes NULL

34

Page 35: plant Diagonistic Expert system

Field Type Null Default

treatment Text No

Table 3: Table for spinach Diagnosis

Field Type Null Default

disease varchar(50) No

yellowleaves Text Yes NULL

swellings Text Yes NULL

whitespots Text Yes NULL

twistedleaves Text Yes NULL

dryleaves Text Yes NULL

treatment Text No

35

Page 36: plant Diagonistic Expert system

Preliminary User Interface Design

Figure 24: Home page showing the different diseases to be diagnosed

The home page shows the option for selecting the different types of plants to be diagnosed. It

also has an option for an expert to access the experts’ page so as to add a new disease.

36

Page 37: plant Diagonistic Expert system

Figure 25: Interface for experts for adding diseases to the knowledge base

This is the interface for an expert to select a plant for which to add a disease to the knowledge

base.

37

Page 38: plant Diagonistic Expert system

Figure 26: Interface for adding a disease for tomato fruit

This is the interface for the expert to add a disease for the tomato plant. The expert enters the

name of the disease, selects one or more symptoms associated with the disease and enters the

recommendation for treatment of the disease.

38

Page 39: plant Diagonistic Expert system

CHAPTER 5: TESTING AND RESULTSIn this chapter, I will demonstrate the main functionality of the system, as well as the results

generated by the system.

Test data

Figure 27: Diagnosing a tomato fruit disease

This is the interface for the user to select symptoms for tomato fruit. The farmer must select one

or more symptoms. The inference engine will then check a matching disease.

39

Page 40: plant Diagonistic Expert system

Figure 28: Output

The above screenshot shows the output after the user selects a number of symptoms. The disease

depends on the symptoms chosen. The system also displays the corresponding recommendation

for treatment.

40

Page 41: plant Diagonistic Expert system

Figure 29: Adding a disease

This is an interface for the expert to add a new disease. The expert cannot add an existing

disease. The expert enters the name of the disease, selects the symptoms for that disease and

enters the recommendation for treatment.

The Quality of the System is maintained in such a way so that it can be very user friendly to all

the users.

41

Page 42: plant Diagonistic Expert system

The software quality attributes of this system are:

a) Accurate and reliable

I achieved this by making sure that the database is designed in such a way that the correct

disease is output by the system, without any errors.

b) Secured

I achieved this by making sure that the experts’ and the administrator’s portals can only

be accessed after login with a secure password.

c) Compatibility

I achieved this by implementing the system’s user interface using jquery mobile, which is

platform independent. The system can therefore be used on a phone running on any

operating system.

Deployment DesignI decided to use parallel deployment technique. I solely picked on parallel technique as it offered

the advantage of backing out to the original system if my system runs into problems. However,

parallel operations require significant effort on the part of everyone involved.

42

Page 43: plant Diagonistic Expert system

CHAPTER 6: DISCUSSIONS AND CONCLUSIONS

IntroductionIn this chapter, I discuss the findings from the testing that I did, the limitations that I faced while

developing and implementations and my conclusions about the project. I will also provide

recommendations on any changes or improvements that can be done to the system in future.

Discussion From the testing that I did, the results were as follows:

Diagnosis of diseases

The system was able to diagnose the diseases matching the symptoms that were entered by the

farmer. In cases where the symptoms matched more than one disease, all the possible diseases

were output by the system.

Viewing of reports by the experts and the administrator

The system was able to store the record of all the diseases that had been diagnosed, as well as the

date and time of diagnosis. These reports can be used by the experts in knowing the most

prevalent diseases during a certain period so that they can adequately plan on how to manage the

diseases.

LimitationsThe major limitation I faced was in designing the inference. I implemented the project using php,

which is not an expert system shell, and therefore, I was not able to implement probability in

determining the most appropriate disease to output in the case whereby there are two or more

possible diseases.

ConclusionsThe system was able to successfully diagnose different types of diseases, provide

recommendations for treatment and also keep a record of all the diagnosed diseases and the time

of diagnosis.

43

Page 44: plant Diagonistic Expert system

RecommendationsIn future the system can be improved in such a way that it incorporates probability in the process

of determining the most appropriate disease to output to the farmer. This will enable the system

to only output a single disease to the farmer, in cases where there are more than one likely

disease.

44

Page 45: plant Diagonistic Expert system

CHAPTER 7: REFERENCES AND APPENDICES

References1. G.N.R. Prasad, Dr. A Vinaya Babu (2006),”A Study of Various Expert System in

Agriculture”, Georgian Electronic Scientific Journal: Computer Science &

Telecommunication 2006 No.4(11)

2. Pinaki Chakraborti, Dr. Dilip Kumar Chakraborti (2008), “An Example of Agricultural

Expert Systems Being Used in India”,Georgian Electronic Scientific Journal : Computer

Science & Telecommunication 2008 No.1(5)

3. Yushu Yang, Fullin Wang, Yongsheng Ma (2005), “The Research On Intelligent

Soyabean Decision- Making System”, Nature and Science, 4(1), 2005.

4. Howard W. Beck, Pierce Jones and J.W. Jones(1989),” SOYBUG: An expert system for

soybean insect pest management”, Agricultural Systems, Vol. 30, Issue 3, 1989, URL:

http://www.sciencedirect.com/science/article/pii/ retrieved on 26th may 2013

5. C. Dale Monks, David C. Bridges, John W. Woodruff, Tim R. Murphy and Daniel J.

Berry (1995),” Expert System Evaluation and Implementation for Soybean (Glycine

max) Weed Management”, Weed Technology Vol. 9, No. 3 (Jul. - Sep., 1995), pp. 535-

540, Weed science Society Of America. URL: http://www.jstor.org/stable/3987669

Retrieved on 28th May 2013

45

Page 46: plant Diagonistic Expert system

Appendix A

Questionnaire

MOBILE BASED SYSTEM FOR HORTICULTURAL DISEASE AND PEST MANAGEMENT

This questionnaire has been developed by Brian Walucho. Its purpose is to collect information

that will help in the development of a mobile based expert system for horticultural disease and

pest management.

The information collected will be highly confidential

Instructions

a. Choose your option by putting an (X) against it

b. Be as honest as possible

Where do you carry out your horticultural farming? (Indicate your county name)

…………………………………………………………………………………………………………………………………

1. Which of the following crops do you grow?

Tomatoes

Spinach

Pepper

2. What are the most common symptoms that you usually notice on the plant(s) that you grow? (Fill where appropriate)

Most common diseases affecting tomatoes:

………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

46

Page 47: plant Diagonistic Expert system

Most common diseases affecting spinach:

……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….

Most common diseases affecting pepper:

………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

3. Do you have a mobile phone?

Yes

No

4. If you have one, is it internet enabled?

Yes

No

5. If you have one, which operating system does it run on?

Symbian

Windows

Android

Black Berry

Others (specify)……………………………………………………………………………………………………………………………………

6. Have you ever accessed solutions to horticultural diseases and pests online?

47

Page 48: plant Diagonistic Expert system

Yes

No

7. If yes, how was the experience?

Convenient

Time consuming

8. Are you willing to use a mobile based expert system for diagnosis of horticultural pests and diseases once it is developed?

Yes

No

I will decide later

Interview

NUMBER QUESTION

1 Do you think there is adequate information about disease diagnosis?

2 Do you think that a knowledge management system will address the problem of lack of enough experts to diagnose common diseases?

3 Do you think a mobile based system is better than other online diagnosis systems?

4 Are you willing to use such a system when developed?

5 What functionalities should be included in a disease diagnosis system?

48

Page 49: plant Diagonistic Expert system

Appendix B

Coding Standard

Code for Diagnosing Tomato Fruit Diseases<?php

include('config.php');

if(isset($_POST['submit']))

{

$a=$_POST['blackspots'];

$b=$_POST['whiterings'];

$c=$_POST['smallfruit'];

$d=$_POST['fruitrot'];

$e=$_POST['fruitfall'];

if($a=="" AND $b=="" AND $c=="" AND $d=="" AND $e==1)

{

$result = mysql_query('SELECT disease, treatment FROM tomatofruit WHERE blackspots="" AND whiterings="" AND smallfruit="" AND fruitrot=""');

?>

<table border="5"padding="5">

<tr bgcolor="green" ><th>disease</th><th>treatement</th></tr>

<?php

while ($row = mysql_fetch_assoc($result2)) {

?>

49

Page 50: plant Diagonistic Expert system

<tr><td><?php echo $row["disease"]; ?></td>

<td><?php echo $row["treatment"]; ?></td>

</tr>

<?php

}

?>

</table>

<?php

}

elseif($a=="" AND $b=="" AND $c=="" AND $d==1 AND $e=="")

{

$result2 = mysql_query('SELECT disease, treatment FROM tomatofruit WHERE blackspots="" AND whiterings="" AND smallfruit="" AND fruitfall=""');

?>

<table border="5"padding="5">

<tr bgcolor="green" ><th>disease</th><th>treatement</th></tr>

<?php

while ($row = mysql_fetch_assoc($result2)) {

?>

<tr><td><?php echo $row["disease"]; ?></td>

<td><?php echo $row["treatment"]; ?></td>

50

Page 51: plant Diagonistic Expert system

</tr>

<?php

}

?>

</table>

<?php

}

elseif($a=="" AND $b=="" AND $c=="" AND $d==1 AND $e==1)

{

$result2 = mysql_query('SELECT disease, treatment FROM tomatofruit WHERE blackspots="" AND whiterings="" AND smallfruit=""');

?>

<table border="5"padding="5">

<tr bgcolor="green" ><th>disease</th><th>treatement</th></tr>

<?php

while ($row = mysql_fetch_assoc($result2)) {

?>

<tr><td><?php echo $row["disease"]; ?></td>

<td><?php echo $row["treatment"]; ?></td>

</tr>

<?php

51

Page 52: plant Diagonistic Expert system

}

?>

</table>

<?php

}

elseif($a=="" AND $b=="" AND $c==1 AND $d=="" AND $e=="")

{

$result2 = mysql_query('SELECT disease, treatment FROM tomatofruit WHERE blackspots="" AND whiterings="" AND fruitrot="" AND fruitfall=""');

?>

<table border="5"padding="5">

<tr bgcolor="green" ><th>disease</th><th>treatement</th></tr>

<?php

while ($row = mysql_fetch_assoc($result2)) {

?>

<tr><td><?php echo $row["disease"]; ?></td>

<td><?php echo $row["treatment"]; ?></td>

</tr>

<?php

}

?>

</table>

52

Page 53: plant Diagonistic Expert system

<?php

}

elseif($a=="" AND $b=="" AND $c==1 AND $d=="" AND $e==1)

{

$result2 = mysql_query('SELECT disease, treatment FROM tomatofruit WHERE blackspots="" AND whiterings="" AND fruitrot=""');

?>

<table border="5"padding="5">

<tr bgcolor="green" ><th>disease</th><th>treatement</th></tr>

<?php

while ($row = mysql_fetch_assoc($result2)) {

?>

<tr><td><?php echo $row["disease"]; ?></td>

<td><?php echo $row["treatment"]; ?></td>

</tr>

<?php

}

?>

</table>

<?php

}

53