# Design and Implementation of Fuzzy Logic Controller for Online Computer Controlled Steering System for Navigation of a Teleoperated Agricultural Vehicle

Authors: Prema Kannan; Senthil Kumar Natarajan; Subhransu Sekhar Dash
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

This paper describes design, modeling, simulation, control, and implementation of teleoperated agricultural vehicle using intelligent technique. This vehicle can be used for ploughing, sowing, and soil moisture sensing. Online computer controlled steering system for a vehicle utilizing two independent drive wheels can be used to avoid obstacles and to improve the ability to resist external side forces. To control the steer angles of the nondriven wheels, the mathematical relationships between the drive wheel speeds and the steer angles of the nondriven wheels are used. A fuzzy logic controller is designed to change the drive wheel speeds and to achieve the desired steer angles. Online control of the agricultural vehicle is achieved from a remote place by means of Web Publishing Tool in LabVIEW. IR sensors in the vehicle are used to detect and to avoid the obstacles around. The developed steering angle control algorithm and fuzzy logic controller have been implemented in an agricultural vehicle which depicts that the vehicle performs its operation efficiently and reduces the manpower and becomes advantageous.


---

## Body

## 1. Introduction

The diminishing number of agricultural wages in India is a momentous issue for Indian agriculture. Robot tractors have been introduced to replace human labors for field work and for improving work efficiency. However, robot tractor needs safety devices to ensure safe operation when it is not operated by a human. Therefore, the safety issue is an important research topic for agricultural robots when utilized on a farm [1].Numerous studies on the automation of agricultural machines, particularly on a solution of this problem, have been carried out. Autonomous navigation and vehicle guidance, a global positioning system (GPS), a gyroscope, machine vision, and other sensors have been used in most of those studies [2–4].Sgorbissa and Zaccaria [5] have proposed a navigation subsystem of a mobile robot which operates in human environments to carry out different tasks, such as transporting waste in hospitals or escorting people in exhibitions. This approach integrates prior knowledge of the environment with local perceptions to carry out the given tasks efficiently and safely. They had discussed the properties of their approach and experimental results recorded during real-world experiments.Murakami et al., [6] have presented a teleoperation system for a hydrostatic transmission drive crawler type robotic vehicle. Their system was developed to satisfy the needs of various farm operations and teleoperation in unknown agricultural fields.There are two vital issues to be resolved for developing a safety device for a teleoperated agricultural vehicle; one is to detect an obstacle surrounding the vehicle and the other one is to determine the location of the obstacle. The performance of various sensors for detecting obstacles has been investigated in recent studies to improve the safety of an autonomous vehicle or assist human driving. Noguchi et al. [7] have introduced a master-slave robot system in which a wireless local area network was utilized to broadcast the GPS position of a slave robot to a master robot, so that the master and slave robots could work together without collision of two robot tractors but could not detect other objects except the robot. In order to identify general obstacles, radar and stereo vision were used in some studies for automobiles [8, 9]. A laser scanner was used to identify and locate other vehicles working in the same field with the robot [10]. In addition, ultrasonic sensors [11] and a bumper switch were mounted in front of robot tractor as a safety system. In those previous studies, a laser scanner, radar, and an ultrasonic sensor were used as a range finder because these sensors can determine distance to the obstacle with a high accuracy.Knudson and Tumer [12] have evaluated reactive and learning navigation algorithms for exploration robots that avoid obstacles and reach specific destinations in limited time and with limited observations. This method uses neuroevolutionary based navigation. Neuroevolutionary approach is policy search method where control is achieved through a search across policies. This search through a population of policies allows the discovery of new and robust control strategies.Direct current (DC) motors are broadly used in conveyors, textile mills, paper mills, position control, and robotic manipulators because they are reliable for an extensive range of operating conditions and their control is fairly simple. Usually DC motors are modeled as linear systems and controlled by linear control approaches. However, most linear controllers give unsatisfactory performance due to changes in the control parameters, loading conditions, and nonlinearities introduced by the armature reaction. When these nonlinearities of the motor are known functions, then adaptive tracking control method can be used [13, 14]. If these nonlinearities of the motor are unknown, neural or fuzzy control is suitable for ensuing satisfactory performance of the closed loop system [15–18]. Senthil Kumar et al., [19] have designed an artificial neuron controller for chopper fed embedded DC drives. The designed neuron controller reduces the steady state error, overshoot, and settling time.The objective of this work is to develop a teleoperated agricultural vehicle which can be used for ploughing, sowing, and soil moisture sensing. Online computer controlled steering system for the vehicle is described and a fuzzy logic controller is designed to achieve steering control based on obstacle and boundary information of the agricultural land. The mathematical relationships between the drive wheel speeds and the steer angles of the nondriven wheels are used to calculate and control the steer angles. The developed fuzzy logic controller controls the speeds of DC motors connected with rear wheels of the agricultural vehicle to achieve the desired steer angle. Using the proposed approach, a teleoperated agricultural vehicle is controlled from a remote place. Infrared (IR) sensors are employed to detect the obstacle. The status of IR sensor helps path planning and changing the direction of the vehicle. Data transmission between the agricultural vehicle and the remote client is achieved by means of Web Publishing Tool. To accomplish this goal, a soil moisture sensor, a stepper motor, and a solenoid valve are used for measuring soil moisture, to control ploughing tool and seed box open and close operation, respectively.


## 2. Architecture of the Proposed System

Figure1 shows the hardware structure of the proposed system. The system consists of DC motors, stepper motor, soil moisture sensor, IR sensors, and a solenoid valve. Soil moisture sensor is used to measure the moisture content of the land. The obstacles around the vehicle are detected using IR sensors. The seed box open and close operation is controlled by solenoid valve during sowing operation. Stepper motor is used to control the up and down movement of ploughing tool. The depth of ploughing can also be controlled by this stepper motor by varying its step angle.Figure 1
Hardware structure of the proposed system.The steer angles of the nondriven wheels are controlled by two DC motors connected with the rear driven wheels of the vehicle. Based on the desired steering angle values, the desired speed values of the DC motors are calculated by using the developed algorithm. The speeds of the DC motors are controlled to the desired value by the designed fuzzy logic controller.The length and width of the agricultural land are measured. The time taken by the vehicle to travel a particular length is determined. Based on this determined time value and the length of the land, the time taken by the vehicle to reach one end of the land to the other end is calculated. The timer value is set to this calculated time value to navigate the vehicle in forward direction. For this calculated time period, the vehicle moves in forward direction, subsequently turns left, and moves in forward direction for the same period and then it turns right and moves forward. Thus by using the time taken by the vehicle to travel the length once, wheel track, and the width of the land, its navigation and steering control actions are repeated.


## 3. Experimental Setup

The hardware prototype set-up of the teleoperated agricultural vehicle is shown in Figures2 and 3. The developed fuzzy logic controller and the control algorithm for ploughing action and solenoid valve were implemented using ATMEL 89C51 microcontroller. A two-way normally closed electromechanical solenoid valve is used to control the flow of seeds. The solenoid valve is energized by a normally closed relay. When the relay is energized, it comes to normally opened position. In this relay position, the solenoid valve is energized and it opens to drop the seeds. By increasing or decreasing the frequency of energization of relay circuit, the distance between the seeds can be increased or decreased.Figure 2
Top view of hardware prototype of the developed teleoperated agricultural vehicle.Figure 3
Elevation of hardware prototype of the developed teleoperated agricultural vehicle.A 12 V stepper motor is used to adjust the position of ploughing tool. By controlling the stepping angle of the stepper motor, the ploughing tool position is being controlled. The navigation speed and steering angle control are achieved by two 12 V DC motors connected with two independent drive wheels. The stepper motor and DC motors are supplied by a 12 V, 7 Ah sealed lead acid battery. A soil moisture sensor is used to measure the moisture content of the soil. The measured value is displayed using LCD display.


## 4. Fuzzy Logic Controller

General proportional integral (PI) and proportional integral derivative (PID) controllers are extensively used for motor control applications. But they do not give satisfactory results when control parameters, loading conditions, and the motor itself are changed. But fuzzy logic controller can be designed without the exact model of the system. This approach of fuzzy logic controller (FLC) design guarantees the stable operation even if there is a change in the parameters and the motor [20].Fuzzy logic control is derived from fuzzy set theory introduced by Zadeh in 1965. In fuzzy set theory, the transition between membership and nonmembership can be gradual. Therefore, boundaries of fuzzy sets can be vague and ambiguous, making it useful for approximate systems. Fuzzy logic controller (FLC) is an attractive choice when precise mathematical formulations are not possible [21].The designed fuzzy logic controller has two inputs and one output. The inputs are error value and change in error and the output is duty cycle. The seven linguistic variables used for “error” and “change in error” are NVB (negative very big), NB (negative big), NM (negative medium), NS (negative small), Z (zero), PS (positive small), PM (positive medium), PB (positive big), and PVB (positive very big). The duty cycle output uses seven linguistic variables like NVB (negative very big), negative big (NB), negative medium (NM), negative small (NS), zero (Z), positive small (PS), positive medium (PM), PB (positive big), and PVB (positive very big). The rule table for the designed fuzzy logic controller is given in Table1. From the rule table, the rules are manipulated as follows.Table 1
Rule table.
Change in error
Error
NVB
NB
NM
NS
Z
PS
PM
PB
PVB
NVB
NVB
NVB
NVB
NVB
NVB
NB
NM
NS
Z
NB
NVB
NVB
NVB
NVB
NB
NM
NS
Z
PS
NM
NVB
NVB
NVB
NB
NM
NS
Z
PS
PM
NS
NVB
NVB
NB
NM
NS
Z
PS
PM
PB
Z
NVB
NB
NM
NS
Z
PS
PM
PB
PVB
PS
NB
NM
NS
Z
PS
PM
PB
PVB
PVB
PM
NM
NS
Z
PS
PM
PB
PVB
PVB
PVB
PB
NS
Z
PS
PM
PB
PVB
PVB
PVB
PVB
PVB
Z
PS
PM
PB
PVB
PVB
PVB
PVB
PVBIf error is NS and change in error is PB, then output is PM.The symbolic expression ofkth rule of the designed fuzzy logic controller is given as follows. 						(1)IfeisLE(k)andΔeisLΔE(k),thenΔuisLΔU(k),
where LE(k), LΔE(k), and LΔU(k) are linguistic values from term sets of error, change in error, and change in output duty cycle, respectively.The meaning of the above definedkth rule in terms of mamdani type implication is given as a fuzzy relation R(k) as follows
(2)μR(k)(e,Δe,Δu)=μLE(k)(e)ΛμLΔE(k)(Δe)ΛμLΔU(k)(Δu).
The overall conclusion by combining the outputs of all the fuzzy rules can be written as
(3)μR(e,Δe,Δu)=μR(1)(e,Δe,Δu)VμR(2)(e,Δe,Δu)cccccccccccccc⋯VμR(k)(e,Δe,Δu).The value ofμR(k) for each value of k is defined in (2).The crisp value of change in duty cycle is computed using centre of area method as follows:(4)Dutycycleoutput=u*=∫u·μU(u)·du∫μU(u)·du,
where u* is defuzzified duty cycle, u is duty cycle output, and μU(u) is Union of the clipped control outputs.


## 5. Mathematical Model for Steering System

Figure4 represents kinematic model of the proposed agricultural vehicle with a primary steering system using two independently driven wheels. ωL and ωR are the wheel speeds of the rear left and rear right drive wheels, respectively. ΦL and ΦR are the steer angles of the front left and front right wheels, respectively. b is the wheel base. tB is the track of the rear wheels and tF is the track of the front wheels. R is the radius of the turning circle of the vehicle (radius of curvature) [22].Figure 4
Kinematic model of the proposed agricultural vehicle.The rate of rotation of the drive axle about the centre of curvature is given by(5)θ˙=VLR+(tB/2)=VRR-(tB/2),
where R is radius of the turning circle of the vehicle (radius of curvature),V
L is translational velocity of the left drive wheel, VR is translational velocity of the right drive wheel, tB is the track of the rear wheels, and tF is the track of the front wheels.If longitudinal slip is considered, the translational velocities become(6)VL=rωL(1-iL),VR=rωR(1-iR),
where r is radius of a drive wheel, and i is longitudinal slipWhen we substitute (6) in(5)The centre of curvature(7)θ˙=rωL(1-iL)R+tB/2=rωR(1-iR)R-tB/2.
When the longitudinal slips are equal for left and right drive wheels, as well as equal radius for the drive wheels, then
(8)θ˙=ωLR+tB/2=ωRR-tB/2.Equal longitudinal slips will occur where traction conditions are the same and under these conditions, slip angles will not be significant.For the front left steerable wheel,(9)SteeringangleΦL=tan-12b(ωL-ωR)ωL(tB+tF)+ωR(tB-tF).
Similarly, for the front right steerable wheel,
(10)SteeringangleΦR=tan-12b(ωL-ωR)ωL(tB-tF)+ωR(tB+tF).IftB=tF, (9) and (10) will be simplified as given in (11), and (12), respectively,
(11)ΦL=tan-1[bt(1-ωRωL)],(12)ΦR=tan-1[bt(ωLωR-1)].


## 6. Calculation of Drive Wheel Speed for Steering Control

If both drive wheels turn with same speed, the robot moves in a straight line. If one wheel rotates faster than the other, the robot follows a curved path inward towards the slower wheel. If the wheels turn at equal speed, but in opposite directions, the robot spins around. Thus, steering the robot is just a matter of varying the speeds of the drive wheels. These drive wheel speeds are calculated from the steer anglesΦL and ΦR.


### 6.1. Calculation of Drive Wheels Speed to Turn the Vehicle Left

To turn the vehicle left, the left wheel speed should be less than the right wheel speed. Hence the left wheel speed is assigned with some low speed value and the expression for desired right wheel speedωDR is derived from the steering angle ΦL of left steerable wheel.LetωL=1rpm; then, (9) will be
(13)tanΦL=2b(1-ωR)(tB+tF)+ωR(tB-tF).From (13), the desired right wheel speed can be written as
(14)ωDR=2b-tanΦL(tB+tF)2b+tanΦL(tB-tF).


### 6.2. Calculation of Drive Wheels Speed to Turn the Vehicle Right

To turn the vehicle right, the right wheel speed should be less than the left wheel speed. Hence the right wheel speed is assigned with some low speed value and the expression for desired left wheel speedωDLis derived from the steering angle ΦR of right steerable wheel.LetωR=1rpm and then (10) will be
(15)tanΦR=2b(ωL-1)ωL(tB-tF)+(tB+tF).From (15), the desired right wheel speed can be written as
(16)ωDL=2b+tanΦR(tB+tF)2b-tanΦR(tB-tF).


## 6.1. Calculation of Drive Wheels Speed to Turn the Vehicle Left

To turn the vehicle left, the left wheel speed should be less than the right wheel speed. Hence the left wheel speed is assigned with some low speed value and the expression for desired right wheel speedωDR is derived from the steering angle ΦL of left steerable wheel.LetωL=1rpm; then, (9) will be
(13)tanΦL=2b(1-ωR)(tB+tF)+ωR(tB-tF).From (13), the desired right wheel speed can be written as
(14)ωDR=2b-tanΦL(tB+tF)2b+tanΦL(tB-tF).


## 6.2. Calculation of Drive Wheels Speed to Turn the Vehicle Right

To turn the vehicle right, the right wheel speed should be less than the left wheel speed. Hence the right wheel speed is assigned with some low speed value and the expression for desired left wheel speedωDLis derived from the steering angle ΦR of right steerable wheel.LetωR=1rpm and then (10) will be
(15)tanΦR=2b(ωL-1)ωL(tB-tF)+(tB+tF).From (15), the desired right wheel speed can be written as
(16)ωDL=2b+tanΦR(tB+tF)2b-tanΦR(tB-tF).


## 7. Computer Simulation and Teleoperation

The simulation of online computer controlled steering system for a teleoperated agricultural vehicle is done based on equation modeling using LabVIEW. Flow chart of the proposed control algorithm is given in Figure5. The simulated models are shown in Figures 6, 7, and 8. The simulation of computer controlled steering system was done with a fuzzy logic controller.Figure 5
Flow chart of the control algorithm.Figure 6
Block diagram of the simulated fuzzy logic control system for a teleoperated agricultural vehicle.Figure 7
Block diagram of the simulated steering angle control system to turn the vehicle left.Figure 8
Block diagram of the simulated steering angle control system to turn the vehicle right.Online control is achieved from remote place using Web Publishing Tool in LabVIEW. This tool is used to create an HTML document and embed static or animated images of the server computer’s front panel in an HTML document as shown in Figures9 and 10. When the HTML document is created, URL is generated as shown in Figure 11. Using this generated URL, a remote user can view and control the front panel remotely by a web browser.Figure 9
Configuration of server computer for remote clients using Web Publishing Tool in LabVIEW.Figure 10
Configuration of server computer for remote clients using Web Publishing Tool in LabVIEW with header and footer details.Figure 11
URL generation by the HTML document.


## 8. Experimental Results

The developed fuzzy logic controller and the control algorithm for ploughing action and solenoid valve were implemented using ATMEL 89C51 microcontroller. The drive wheels speeds are controlled by two 12 V DC motors. By using the proposed control algorithm, the speeds of these DC motors are controlled and measured values are plotted in the graph. The experimental response of left and right DC motors when the vehicle moves in forward, reverse, left, and right directions are shown in Figures12, 13, 14, and 15.Graph of actual speed values of left motor and right motor when the agricultural vehicle moves in forward direction with the set speed value of 10 rpm.
(a)
(b)Graph of actual speed values of left motor and right motor when the agricultural vehicle moves in reverse direction with the set speed value of 10 rpm.
(a)
(b)Graph of actual speed values of left motor and right motor when the agricultural vehicle turns in left direction.
(a)
(b)Graph of actual speed values of left motor and right motor when the agricultural vehicle turns in right direction.
(a)
(b)


## 9. Conclusion

In this paper, a teleoperated agricultural vehicle capable of performing ploughing, sowing, and soil moisture sensing was successfully developed. Two independent drive wheels installed on the vehicle are used for motion and steering control. The developed fuzzy logic controller controls the steering angle of the teleoperated vehicle according to the desired steering angle. Using the proposed agricultural vehicle depth of ploughing and the distance between the seeds can be varied. By measuring the moisture content of the soil, the crops are watered adequately. Thus this teleoperated agricultural vehicle reduces the manpower and becomes advantageous.



---

*Source: 590861-2013-12-31.xml*