ISSN ONLINE(2320-9801) PRINT (2320-9798)

All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

# Adaptive Fuzzy Based Solution of Inverted Pendulum & Aircraft Landing Problems

 Vijayalakshmi.J, Pavithra.R and Rudresha.M Department of MCA, Adhiyamaan College of Engg, Tamilnadu, India Related article at Pubmed, Scholar Google

Visit for more related articles at International Journal of Innovative Research in Computer and Communication Engineering

## Abstract

Real world Problems are complex and uncertain in the form of ambiguities. As complexity increases the precision afford by the classical solution methods were not sufficient. If we have precise and sufficient amount of data for testing and training, then machine learning methods like Artificial Neural Networks provide a powerful and accurate solutions. If we have incomplete data from which we can get only ambiguous and imprecise information, then the top ranging solution is fuzzy logic. The focus of this paper moves towards testing two benchmark systems, the classical inverted pendulum and aircraft landing control system. These two problems are implemented through the fuzzy logic toolbox available in MATLAB7 Student edition and the results are also compared for their performance.

### Keywords

Fuzzy Logic, Imprecision, Uncertain, Ambiguous

### INTRODUCTION

Fuzzy logic is all about the relative importance. How importance is to be exactly right when a rough answer will do? Some clever people said in past are: precision is not truth. Sometimes the more measurable drives out the most important. Vagueness is no more to be down away with in the world of logic than friction in mechanics. I believe that nothing is unconditionally true, and hence I am opposed to every statement of positive truth and everyman who makes it. Why use fuzzy logic? Fuzzy logic is conceptually easy to understand the mathematical concepts behind fuzzy reasoning are very simple what makes fuzzy nice is the “naturalness” of its approach and its far-reaching complexity. Fuzzy logic is flexible. Fuzzy logic is tolerant of imprecise data. Fuzzy logic can model nonlinear function of arbitrary complexity.

#### Fuzzy Vs Nonfuzzy:

A specific example would be helpful at this point to illustrate the value of fuzzy logic linear and fuzzy Problem: what is the right amount to tip our waitperson?

#### Nonfuzzy Solution:

Given a number 0 to 10 that represent the quality at restaurant (where 10 is the excellent) what should be the tip? This problem is based on tipping as it is typically practiced in the United States. An average tip a meal in U.S. is 15% though the actual amount may vary depending on the quality of the service provided. Let’s start with the simplest possible relationship suppose that the tip always equals 15% of the total .leaving aside all the factors that could be arbitrary. If I make a list of what really matters in this problem I might end up with following descriptions.

#### Fuzzy Solution

Let us start with a basic description of a two input, one output problem

#### Two inputs:

• How is service?
• How was food?
One Output
• Waiter tip based on the service quality and food quality
Given a number between [0-10] that describe the how is service [10 is excellent]. Given a another number between [0-10] that describe the how was food [10 means delicious]
• If the service is poor or food is rancid then tip is cheap.
• If the service is good then tip is average.
• If the service is excellent or the food is delicious then tip is generous.

### APPLICATIONS OF FUZZY LOGIC

#### Water Level Control:

Let us consider a tank with a pipe flowing in and a pipe flowing out. I can change the valve controlling the water that flows in, but the outflow rate depends on the diameter of the outflow pipe (which is constant) and the pressure in the tank (which varies with the water level).
Input: Water level
Output: Water flow speed
l - Level of water
v- Water flow speed
• If (l is ok) then (v is no change)
• If (l is low) then (v is open fast)
• If (l is high) then (v is close fast)

#### Two Lines:

To see a specific example of a system with linear input, output membership functions consider the following system with one input and one output stored in.
The input membership functions and rules define which of those output functions will be expressed they are
• If (input is low) then (output is line1)
• If (input is high) then (output is line 2)

### Benchmarks Applications:

#### Inverted Pendulum:

Fig 1. shows the classic inverted pendulum system. This has been an interesting case in control theory for many years.
I want to design and analyze a fuzzy controller for the simplified version of the inverted pendulum system .the differential equation describing the system is given below.
-ml2 (d2?/dt) + mlg) sin(?) = μ(t)
d x1/dt = x2
dx2/dt = (g/l) sin(x1)-(l/Ml2)μ(t)
x1(k+1) = x1(k) + x2(k)
x2(k+1) = x1(k) + x2(k) - μ(k)
For this problem we assume the universe of discourse for the two variable to be -2? ≤ x1≤2? and -5dps≤x2≤5 dps (d.p.s. = degree per second)

#### Aircraft landing:

The following example shows the flexibility and reasonable accuracy for another application in fuzzy control. We will conduct a simulation of the final and leading approach of an aircraft. The desired velocity is. the desired downward velocity gets smaller and smaller .in the limit, as the height becomes vanishing small, the downward velocity also goes to zero .in this way the aircraft will descend from altitude promptly but will touch down very gently to avoid damage.
In difference notation we get
vi+1 = vi + fi
hi+1 = hi + vi
Where the new velocity is the old velocity is the new height and is the old height. These two “control equations” define the new value of the state variables ‘v’ and ‘h’ is response to control input and the previous state values

### IMPLEMENTATION DETAILS

#### Inverted Pendulum:

Step 1: First we want to construct three membership functions for x1 on its universe that is for values positive(P), zero (Z) and negative (N).
Step 2: To partition the control space (output) we will construct five membership function for u (k) `on its universe, which is -24≤u (k) ≤24.
Step 3: We then construct nine rules (even though all may not need this many) in 3*3 FAM table for this system, which would involve ? and ? in order to stabilize the inverted pendulum system. The entries in this table are the control actions u (k)
Step 4: Produce a membership functions for the control action. U (k).
These rules are given from table no: 1
• If (x1=P) and (x2=P) then (u=PB)
• If (x1=P) and (x2=Z) then (u=P)
• If (x1=P) and (x2=N) then (u=Z)
• If (x1=Z) and (x2=P) then (u=P)
• If (x1=Z) and (x2=Z) then (u=Z)
• If (x1=Z) and (x2=N) then (u=N)
• If (x1=N) and (x2=P) then (u=Z)
• If (x1=N) and (x2=Z) then (u=N)
• If (x1=N) and (x2=N) then (u=NB)
Let the initial condition for x1 and x2 respectively are
X1(0) = 1 degree
X2(0) = -4dps

#### Aircraft Landing Control problem

Step 1: Define membership function for state variables as shown below
• Height
• Velocity
Membership values for height and velocity are shown in Appendix-1
Step 2: Define a membership function for the control output is shown in Table no:2
Step 3: Define the rules and summarize them in Table no:2
Step 4: Define the initial conditions and conduct a simulation for four cycles. since the task at hand is to control the aircraft at an altitude of 1000 feet with a downward velocity of -20ft/s we will use the following equations to update the state variables for each cycle
Different equations are derived from FAM Table no:2 . They are.
• If(h=L) and (v=DL) then (f=z)
• If(h=L) and (v=DS) then (f=z)
• If(h=L) and (v=Z) then (f=z)
• If(h=L) and (v=US) then (f=z)
• If(h=L) and (v=UL) then (f=z)
• If(h=M) and (v=DL) then (f=z)
• If(h=M) and (v=DS) then (f=z)
• If(h=M) and (v=Z) then (f=z)
• If(h=M) and (v=US) then (f=z)
• If(h=M) and (v=UL) then (f=z)
• If(h=S) and (v=DL) then (f=z)
• If(h=S) and (v=DS) then (f=z)
• If(h=S) and (v=Z) then (f=z)
• If(h=S) and (v=US) then (f=z)
• If(h=S) and (v=UL) then (f=z)
• If(h=NZ) and (v=DL) then (f=z)
• If(h=NZ) and (v=DS) then (f=z)
• If(h=NZ) and (v=Z) then (f=z)
• If(h=NZ) and (v=US) then (f=z)
• If(h=NZ) and (v=UL) then (f=z)
In these equations ‘h’ represent height and v = velocity and f =control force
vi+1 = vi + fi
hi+1 = hi + vi
Initial height h0 :1000 ft
Initial velocity v0 = -20 ft/s
Control f0 = to be computed
h1 = h0 + v0 = 1000 +(-20) =980 ft
v1 = v0 + f0 = -20 +5.8 = -14.2ft/S
Height h =980 ft and mat 0.64 velocity v = -14.2 ft/fires ds at 0.58 and dl at 0.42
Height Velocity Output
L(0.96)AND DS(0.58) => DS(0.58)
L(0.96)AND DS(0.42) => Z(0.42)
M(0.64)AND DS(0.58) => Z(0.58)
L(0.96)AND DS(0.58) => μs(0.42)
We find the centroid to be f 0.5 lbs

### RESULTS

#### Aircraft Landing Control Problem:

Basic equations are
vi+1 = vi + fi
hi+1 = hi + vi
There are basic equations
Initial conditions are
h0 = 1000ft; v0 = - 20ft/S
We may calculate h(i),v(i) height and any velocity step by step.
h1 = h0 + v0
= 1000 + (-20)
= 980 ft
v1 = -14.2 ft/S

### CONCLUSION

Using the above two experiments I know about the performance of Inverted Pendulum problem and Aircraft landing problem. The results are given here. The result of using Fuzzy logic greatly improves the system performance above 60% which is a very significant result of fuzzy logic. I used four cycles for measuring the performance. The number of cycles may be improved nd the performance measure taken from those increased cycles could be compared with these initial results.

### Tables at a glance  Table 1 Table 2

### Figures at a glance Figure 1