# Fuzzy Logic Based Hydroelectric Dam Control System Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

information storage and retrieval, web search, image processing, control, pattern recognition, bio-information and computational biology, e-markets,

autonomous navigation, and guidance are benefited

using fuzzy sets. An integrated framework sustaining a variety of facets of human-centric computing is

developed by means of fuzzy sets. The current trends of information technology have proved that the increasing level of intelligence, autonomy and required flexibility comes true with the increased human centricity of

resulting results. The holistic view covers concepts,

design methodologies, and algorithms with

interpretation, analysis, and engineering knowledge. The computing systems are based on predefined models of two-valued logic and human information processing, concerned with two distinct words. In order to

communicate between these two words we need to

develop an interface. This is the key motivation behind the emergence of human-centric systems and human-centric computing [1].

The construction of a dam is necessary for the electric power generation, flood control, irrigation system, metropolitan and industrial water supply. Different kind of methods have been introduced and implemented to control the hydro-electric power dam due to non-deterministic behavior of water parameters such as flow rate and release etc. [2].

Fuzzy Set Theory along with its membership functions was implemented to the Fairbairn reservoir in Emerald, Central Queensland, Australia where fuzzy rules were generated with explicit recognition of storage volume non-specificity in the discrete Stochastic Dynamic

Programming (SPD) [3].

Fuzzy dynamic programming model was used for

Hirakud dam in the State of Orissa in India in which

irrigation; hydropower generation and flood control were considered as fuzzy variables [4].

The neural network and fuzzy systems were also adopted for dam control in which a comparison was made

between reservoir operations using the fuzzy and neural network systems and actual one by operator, using

examples of floods during flood and non-flood seasons [5].

Reports show that hydroelectric dams produce 20 percent of the world's total production of electrical energy. The

development of a hydro-electric power dam control

system based on fuzzy logic with two inputs and two outputs. Using water level and flow rate measuring

devices for feedback control, and two control elements for draining and valve controlling (release), and formulated fuzzy rules for water level and flow rate has been achieved.

To control the water release, the controller reads the

water level and flow rate after every sampling period. This proposed design work of Hydro-Electric Power Dam System is the application of fuzzy logic control system consisting of two input variables: water level and flow rate, and two output variables: Drain valve and

(Releasing) Valve control used in a reservoir plant of

Hydro-Electric Power Dam to monitor the system of Dam.

The basic structure of the proposed model is described in Section 2. Section 3 gives the simplified design algorithm of fuzzy logic for Hydro-Electric Power Dam System.

Section 4 describes the simulation results of this system. Conclusion and future work is given in Section 5.

## 2. BASIC STRUCTURE OF THE PROPOSED HYDRO-ELECTRIC POWER DAM

Fig.1 Arrangement of proposed hydro-electric power system

The main parts of the proposed hydro-electric power plant are shown in Fig. 1. Upper lake where water is stored presents the water level. The greater the vertical distance b/w the upper and lower lakes, the more is the generation of electricity. In order to release or block water, a control valve is used according to the need. Water on releasing from the dam gets to the blades of the turbine all the way through the penstock. Its slope and thickness determines the efficiency of the dam. Turbine produces electrical energy and water released from the turbine is released to lower lake where the drainage system is brought into action according to the

requirements [6].

The schematic diagram of the proposed hydro-electric power plant is shown in Fig. 2. Water level and flow rate devices are used to monitor the status of water in the plant which is connected with the two fuzzifiers of the fuzzy logic control system after suitable amplification and voltage adjustment unit. Two outputs of defuzzifiers are the releasing control valve and drainage valve.

Fig. 2 Block Diagram of Hydro-Electric Power Dam fuzzy control system

## 3. DESIGN ALGORITHM

The algorithm designed for this system consists of two fuzzy input variables. Five triangular membership

functions are equally determined over a scale range of 0 m to 20 m for the water level and 0(m3s-1) to100000(m3s-1) for flow rate inputs. The five fuzzy membership functions for water level input are termed as: very low 0-5 m, low

0-10 m, below danger5-15 m, danger10-20 m and above danger15-20 m. The five fuzzy membership functions for flow rate input are: very slow 0m3s-1 -25000m3s-1, slow 0m3s-1-50000m3s-1, normal 25000m3s-1-75000m3s-1, fast 50000m3s-1-100000m3s-1, and very fast 75000m3s-1-100000m3s-1.Two outputs of this proposed system are: (release) control valve and drainage valve. The control valves for release and drainage output variables consist of five membership functions: fully closed 0-5, 25% Opened 0-50, 50% Opened 40-60, 75% Opened 50-90 and Fully Opened 70-100.

## 3.1. Fuzzifier

The input crisp values are compared by the fuzzifier with certain levels and generate linguistic values of each input variable for inference engine. The inference engine

simulates human decision with fuzzy concepts,

implication and rules of inference in fuzzy logic [7]. The occupied region description, membership functions and range for two input variables are given in Table 1 and Table 2.

TABLE 1

MEMBERSHIP FUNCTIONS AND RANGES OF INPUT VARIABLE WATER LEVEL (m)

## Membership Function (MF)

## Ranges

## Region Occupied

Very Low

0-5

1

Low

0-10

1-2

Below Danger

5-15

2-3

Danger

10-20

3-4

Above Danger

15-20

4

TABLE 2

MEMBERSHIP FUNCTIONS AND RANGES OF INPUT VARIABLE FLOW RATE (m3/s)

## Membership Function (MF)

## Ranges

## Region Occupied

Very Slow

0 -25000

1

Slow

0-50000

1-2

Normal

25000-75000

2-3

Fast

50000-100000

3-4

Very Fast

75000-100000

4

For each input variable, five membership functions are used as shown in Fig. 2 and in Fig. 3.

Fig.3 Plot of membership functions for input variable,

"WATER LEVEL"

The five membership functions, "very low", "low",

"below danger", "danger" and "above danger" are used to show the various ranges of input fuzzy variable

"WATER LEVEL" in a plot consisting of four regions as shown in Fig. 2.

The five membership functions, "very slow", "slow", "normal", "fast" and "very fast" are used to show the various ranges of input fuzzy variable "FLOW RATE" in a plot also consisting of four regions as shown in Fig. 3.

Fig. 4 Plot of membership functions for input variable, "FLOW RATE"

The linguistic values are the mapping values of the fuzzy input variables with the membership functions occupied in the regions. As we are using two variables, therefore four linguistic values are shown in Fig.4. The mapping of input fuzzy variables with the functions in four regions is listed in Table 3.

TABLE 3

LINGUISTIC VALUES OF FUZZIFIERS OUTPUTS IN ALL REGIONS

## Input Variables

## Linguistic Fuzzifiers Outputs

## Region 1

## Region 2

## Region 3

## Region 4

Water Level

f1

f1[1]

f1[2]

f1[3]

f1[4]

f2

f1[2]

f1[3]

f1[4]

f1[5]

Flow Rate

f3

f2[1]

f2[2]

f2[3]

f2[4]

f4

f2[2]

f2[3]

f2[4]

f2[5]

TABLE 4

RULE MAPPING FOR REGIONS OCCUPIED

Case No.

Regions Occupied

Rules

fn[m]= Membership value, where n=No. of input variable,

m=No. of membership function MF occupied

Water Level

Input

variable 1

Flow Rate

Input variable 2

1.

1

1

R1 = f1 ^ f3 =f1[1] ^ f2[1]

R2 = f1 ^ f4 =f1[1] ^ f2[2]

R3 = f2 ^ f3 =f1[2] ^ f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f1 ^ f4 = f1[3] ^ f2[3]

R3 = f2 ^ f3 = f1[4] ^ f2[2]

R4 = f2 ^ f4 = f1[4] ^ f2[3]

11.

3

3

R1 = f1 ^ f3 = f1[3] ^ f2[3]

R2 = f1 ^ f4 = f1[3] ^ f2[4]

R3 = f2 ^ f3 = f1[4] ^ f2[3]

R4 = f2 ^ f4 = f1[4] ^ f2[4]

12.

3

4

R1 = f1 ^ f3 = f1[3] ^ f2[4]

R2 = f1 ^ f4 = f1[3] ^ f2[5]

R3 = f2 ^ f3 = f1[4] ^ f2[4]

R4 = f2 ^ f4 = f1[4] ^ f2[5]

13.

4

1

R1 = f1 ^ f3 = f1[4] ^ f2[1]

R2 = f1 ^ f4 = f1[4] ^ f2[2]

R3 = f2 ^ f3 = f1[5] ^ f2[1]

R4 = f2 ^ f4 = f1[5] ^ f2[2]

14.

4

2

R1 = f1 ^ f3 = f1[4] ^ f2[2]

R2 = f1 ^ f4 = f1[4] ^ f2[3]

R3 = f2 ^ f3 = f1[5] ^ f2[2]

R4 = f2 ^ f4 =f1[5] ^ f2[3]

15.

4

3

R1 = f1 ^ f3 = f1[4] ^ f2[3]

R2 = f1 ^ f4 = f1[4] ^ f2[4]

R3 = f2 ^ f3 = f1[5] ^ f2[3]

R4 = f2 ^ f4 = f1[5] ^ f2[4]

16.

4

4

R1 = f1 ^ f3 = f1[4] ^ f2[4]

R2 = f1 ^ f4 = f1[4] ^ f2[5]

R3 = f2 ^ f3 = f1[5] ^ f2[4]

R4 = f2 ^ f4 = f1[5] ^ f2[5]

Fuzzification process for two input variables need two separate fuzzifiers. Each fuzzifier consists of: input

voltage to crisp value converter, operational region for a crisp value detector, fuzzy set membership value

mapping and selection arrangements [8]. The design of such a fuzzifier is shown in Fig. 5.

Fig. 5 Fuzzifier Block

Table 5 gives the working results of two fuzzifiers using the given values of input variables. These results are achieved using the fuzzifier design for water level and flow rate inputs shown in Fig. 6 (a) and Fig. 6 (b) [9].

Fig. 6 (a) Design of fuzzifier for Water Level Input

Fig. 6 (b) Design of fuzzifier for Flow Rate Input

TABLE 5

RESULTS OF FUZZIFICATION

## Input Variables

## Values

## Region Selection

## Fuzzy Set Calculation

Water Level

x=13

10â‰¤x<15

Region-3

f1=(15-13)/5=0.4

f2=1-f1=1-0.4=0.6

Flow Rate

x=95000

75000â‰¤x<100000

Region-4

f3=(100000-95000)/25000=0.2

f4=1-f3=1-0.2=0.8

## 3.2. Inference Engine

The inference engine contains four AND operators that select minimum value input for the output. This inference engine accepts four inputs from fuzzifier and applies the min-max composition to obtain the output R values. The min-max inference method uses min-AND operation

between the four inputs. Fig. 7 shows this type of

inference process.

Number of active rules = mn, where m = maximum

number of overlapped fuzzy sets and n= number of inputs. For this design, m = 5 and n = 2, so the total number of active rules are 25.The total number of rules is equal to the product of number of functions accompanied by the input variables in their working range [10]. The two input variables described here consisted of five membership functions. Thus, 5 x 5 = 25 rules were required which are shown in Table 6.

TABLE 6

TOTAL NUMBER OF RULES

## INPUTS

## OUTPUTS

## Water Level

## (m)

## Flow Rate

## (m3/s)

## Out-flow

## (Valve)

## Drain Valve

Very Low

Very Slow

Fully closed

Fully closed

Very Low

Slow

Fully closed

Fully closed

Very Low

Normal

Fully closed

Fully closed

Very Low

Fast

Fully closed

Fully closed

Very Low

Very Fast

Fully closed

Fully closed

Low

Very Slow

Fully closed

Fully closed

Low

Slow

Fully closed

Fully closed

Low

Normal

Fully closed

Fully closed

Low

Fast

Fully closed

Fully closed

Low

Very Fast

Fully closed

Fully closed

Below Danger

Very Slow

Fully closed

25% opened

Below Danger

Slow

25% opened

25% opened

Below Danger

Normal

25% opened

25% opened

Below Danger

Fast

50% opened

50% opened

Below Danger

Very Fast

50% opened

75% opened

Danger

Very Slow

50% opened

50% opened

Danger

Slow

50% opened

50% opened

Danger

Normal

75% opened

Fully opened

Danger

Fast

75% opened

Fully opened

Danger

Very Fast

75% opened

Fully opened

Above Danger

Very Slow

75% opened

75% opened

Above Danger

Slow

75% opened

Fully opened

Above Danger

Normal

Fully opened

Fully opened

Above Danger

Fast

Fully opened

Fully opened

Above Danger

Very Fast

Fully opened

Fully opened

In this case only 4 rules are required for the particular values of two variables because each value of two

variables in a region corresponds to mapping of two

functions. The corresponding mapping values of f1 [3], f1 [4], f2[2], f2[3] were used to establish the 4 rules. Here f1 [3] means the corresponding mapping value of membership function "Below Danger" of water level in region-3 and the similar definitions are for the others.

R1 = f1 ^ f3 = f1[3] ^ f2[4] = 0.4 ^ 0.2 = 0.2

R2 = f1 ^ f4 =f1[3] ^ f2[5] = 0.4 ^ 0.8 = 0.4

R3 = f2 ^ f3 =f1[4] ^ f2[4] = 0.6 ^ 0.2 = 0.2

R4 = f2 ^ f4 =f1[4] ^ f2[5] = 0.6 ^ 0.8 = 0.6

Fig. 7 Block Diagram of Inference Engine

## 3.3. Rule Selector

The rule selector receives two crisp values of water level and flow rate. It gives singleton values of output

functions under algorithm rules applied on design model. For two variables, four rules are needed to find the

corresponding singleton values S1, S2, S3 and S4 for each variable according to these rules are listed in Table 7.

TABLE 7

ILLUSTRATION OF RULES APPLIED MODEL

## Rule No.

## INPUTS

## SINGLETON VALUES OF OUTPUTS

Water Level

Flow Rate

Release Control

Valve

Drainage Valve

1

Below Danger

Fast

0.50

=50% opened

50% opened =0.50

2

Below Danger

Very Fast

0.50

=50% opened

75% opened =0.75

3

Danger

Fast

0.75

=75% opened

Fully Opened

=1.0

4

Danger

Very Fast

0.75

=75% opened

Fully Opened

=1.0

The rule base accepts two crisp input values, distributes the universe of discourse into regions with each region containing two fuzzy variables, fires the rules, and gives the output singleton values corresponding to each output variable. Fig. 8 shows the main block diagram of the Rule Base.

Fig. 8 Rule Base

## 3.4. Deffuzifier

In this system, two defuzzifiers control the actuators;

Release (Valve Control and Drainage Valve. The membership functions of the two output variables are shown in Fig. 7 to Fig.9, and the detail of each plot is given in

Table 8.

TABLE 8

OUTPUT VARIABLES MEMBERSHIP FUNCTIONS

## MFs

## Range

## Release(Valve)

## Drain Valve

MF1

0-5

Fully Closed

Fully Closed

MF2

0-50

25% Opened

25% Opened

MF3

40-60

50% Opened

50% Opened

MF4

50-90

75% Opened

75% Opened

MF5

70-100

Fully Opened

Fully Opened

Fig. 9 Plot of Membership Functions for Output Variable,

"Drain Valve"

Fig. 10 Plot of Membership Functions for Output Variable,

"Release (Valve Control)"

The defuzzification process provides the crisp value

outputs after estimating its inputs [11]. In this system 8 inputs are given to each of the two defuzzifiers. Four

values of R1, R2, R3, R4 from the outputs of inference

engine and four values S1, S2, S3, and S4 from the rule

selector are shown in Fig. 10. Each defuzzifier estimates the crisp value output according to the center of average (C.O.A) method using the mathematical expression, i * Riâ„ Ri, where i = 1 to 4. Each output variable membership function plot consists of five functions with the same range values for simplification.

Fig. 11 Defuzzifier Block

Fig. 11 shows the design arrangement of a defuzzifier.

One defuzzifier consists of: one adder for Ri, four

multipliers for the product of Si*Ri, one adder for i * Ri, and one divider for i * Riâ„ Ri. Finally a defuzzifier gives the estimated crisp value output.

## 4. RESULTS AND DISCUSSION

The designed values for two outputs; Release (Valve

Control) and Drain Valve are given in the Table 9 and Table 10. According to the results of inference engine

Ri = R1+R2+R3+R4 = 0.2+0.4 +0.2 +0.6 = 1.4

TABLE 9

DESIGNED VALUE FOR CONTROL VALVE (RELEASE)

## i

## Ri

## Si

## Ri * Si

1

0.2

0.50

0.10

2

0.4

0.50

0.20

3

0.2

0.75

0.15

4

0.6

0.75

0.45

i * Ri= 0.90

i * Riâ„ Ri= 0.90/1.4 = 0.6428= 64.28% of the Valve will be Opened.

TABLE 10

DESIGNED VALUE FOR DRAIN VALVE

## i

## Ri

## Si

## Ri * Si

1

0.2

0.50

0.1

2

0.4

0.75

0.3

3

0.2

1.0

0.2

4

0.6

1.0

0.6

i * Ri= 1.2

i * Riâ„ Ri= 1.2/1.4 = 0.8571= 85.71 % of Drain Valve.

Using mathematical expression i * Riâ„ Rithe crisp

values for output variables were determined and the

results were found according to the MATLAB simulation as shown in Fig. 12. These results are compared in Table 12 and found correct according to the design model. MATLAB simulation was adapted according to the

arrangement of membership functions for four rules as given in Table 11.

TABLE 11

ARRANGEMENT OF MEMBERSHIP FUNCTIONS FORSIMULATION

## Rule No.

## INPUTS

## OUTPUTS

Water Level

Flow Rate

Release(Valve)

1

Below Danger

Fast

50% opened

2

Below Danger

Very Fast

50% opened

3

Danger

Fast

75% opened

4

Danger

Very Fast

75% opened

In Fig. 12 the same values of input variables, Water Level = 13, and Flow Rate = 95000 are shown. Various values of input and output variables match the dependency scheme of the system design. The simulated values were checked using MATLAB-Rule viewer as shown in Fig. 12.

The correctness of results shows the validity of the

simplified design work for processing system using

control system.

Fig. 12 MATLAB-Rule Viewer

TABLE 12

COMPARISON OF SIMULATED AND CALCULATED RESULT

## Result

## Release

## ( Control Valve)

## Drain Valve

Design Values

64.2

85.7

MATLAB Simulation

65.2

83.8

% error

1.55

2.21

## 4.1. Simulation Graphs Discussion

This system was simulated for the given range of input variables. The given value of: Water Level = 13 lies in

region 3 of the range 10-15 and Flow Rate = 95000 lies in region 4 of the range 75000-100000. The four rules were applied for MATLAB simulation according to this range scheme. In this design model, the release and drain

control valves depends upon the selected values of water level and flow rate. The simulated and calculated results are according to the dependence scheme.

Fig. 13(a) shows that the control valve is directly

proportional to water level and it does not depend upon the flow rate. Fig. 13(b) shows that the drain valve system is directly proportional to flow rate.

Fig. 13(a) Plot between Water Level - Flow Rate Release Valve Opened/Closed

Fig. 14 Plot between Water Level and Flow Rate Drain Valve

## 5. CONCLUSION

Both the design model and simulation results are same. The designed system can be extended for any number of inputs and outputs. The drain valve control output can be utilized further for land irrigation according to the need and water release control valve for electric generation to fulfill the dire need of this system in automation.

The design work is being carried out to design state of the art fuzzy logic Hydro-Electric control system in future using FPGAs.

Top of Form