0% found this document useful (0 votes)
20 views10 pages

PB - Fuzzy Logic Controller For Water Level Detector

This is the research paper on fuzzy logic controller for water level indicator which contains a lot information about it.

Uploaded by

Peter Barber
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views10 pages

PB - Fuzzy Logic Controller For Water Level Detector

This is the research paper on fuzzy logic controller for water level indicator which contains a lot information about it.

Uploaded by

Peter Barber
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Journal of Microprocessor and Microcontroller Research

Vol. 1, Issue 1 (January – April, 2024) pp: (1-10)

Fuzzy Logic Controller for Water Level Detector


Prasad Pradip Babar*
Under Graduate Student, Department of Electronics and Telecommunication, Rajarambapu Institute
of Technology, Islampur, Sangli, Maharashtra, India
*
Corresponding Author: [email protected]

Received Date:November 30,2023 ; Published Date:December13,2023

Abstract
This paper presents a novel Fuzzy Logic Controller (FLC) designed for a water level detector with
a hydrostatic pressure sensor that takes into account two critical parameters: the pressure of
water in the tank and the density of air in the tank. As water management becomes more critical,
precise control mechanisms are required to maximize resource utilization. The incorporation of
hydrostatic pressure sensing, which can capture real-time water level data, provides a solid
foundation for the proposed FLC. Unlike traditional controllers, our FLC takes a more nuanced
approach by including water pressure and air density as input parameters. The controller mimics
human-like reasoning by utilizing fuzzy sets and rule-based decision-making to adapt to the
dynamic and uncertain nature of water systems. The FLC improves its ability to respond
accurately to fluctuating water levels by conducting a thorough analysis of fuzzy sets and
membership functions for both parameters. Simulations and experimental validations demonstrate
the FLC's ability to keep precise water levels within predefined thresholds. The addition of air
density as a contributing factor improves the controller's ability to adapt to a variety of
environmental conditions. The proposed system is a significant step forward in intelligent water
management, providing a comprehensive solution for accurate water level detection and control.
By presenting a versatile FLC that accounts for multiple influencing factors in real-world
applications, this study contributes to the evolving landscape of water resource management.

Keywords- Fuzzy logic, Hydrostatic pressure sensor, MATLAB R2023b, Sensor reading, Water
resource

INTRODUCTION Background

Water, as a limited and vital resource, Because of their dependability and real-
necessitates precise and efficient management to time data acquisition capabilities, the integration
meet the growing global demand for sustainable of hydrostatic pressure sensors in water level
living. Water level control and monitoring in detection systems has become standard practice.
tanks and reservoirs are critical aspects of water These sensors can provide accurate information
resource management. Traditional control about the water level in a tank or reservoir by
systems frequently fail to adapt to the dynamic measuring the hydrostatic pressure at a given
and uncertain nature of water systems, depth. The challenge, however, is in developing
necessitating the investigation of advanced a control system capable of intelligently
methodologies. This paper describes a cutting- interpreting these data and making precise
edge approach to water level detection that decisions, particularly in the presence of
integrates a Fuzzy Logic Controller (FLC) with a uncertainties.
hydrostatic pressure sensor. Our proposed FLC
goes beyond traditional methods by Motivation
incorporating two critical parameters: the
pressure of water in the tank and the density of The need for a more adaptable and
air within the tank [1]. responsive water level control system drove the

1 © MAT Journals 2024. All Rights Reserved


Fuzzy Water Level Detection Prasad Pradip Babar

motivation for this research. Conventional level dynamics. While hydrostatic pressure
controllers frequently overlook the effect of air measures water depth directly, air density within
density within the tank, which can have a the tank can fluctuate due to environmental
significant impact on water level dynamics. Our factors, affecting buoyancy and pressure
goal is to create a Fuzzy Logic Controller that dynamics. The combination of these two
uses not only hydrostatic pressure data but also parameters aims to capture a more
the density of air in the tank as critical input comprehensive understanding of the system,
parameters. This approach aims to improve the ensuring the FLC's adaptability and precision
control system's adaptability and accuracy in across a wide range of scenarios [4].
varying environmental conditions.
Methodology
Objectives
The proposed methodology entails
The primary objectives of this research creating a Fuzzy Logic Controller in MATLAB
are twofold: firstly, to design and implement a R2023b using the most recent advancements and
Fuzzy Logic Controller for water level detection features of the software. Water pressure and air
using MATLAB R2023b, leveraging the density fuzzy sets and membership functions
capabilities of the latest version of the software; will be meticulously defined to reflect the
and secondly, to extend the conventional linguistic variables associated with these
hydrostatic pressure sensor-based system by parameters. To emulate human-like reasoning,
including the density of air within the tank as an rule-based decision-making will be used,
additional input parameter. Through these allowing the controller to make intelligent
objectives, we aim to develop a comprehensive decisions in response to real-time data. To
and robust water level control system that excels validate the FLC's effectiveness, simulations will
in accuracy, adaptability, and responsiveness [2]. be run under a variety of conditions, including
scenarios with changing water levels and air
Scope of the Study density. Furthermore, experimental setups will
be used to evaluate the controller's performance
The scope of this study includes the in a real-world context, with input data acquired
theoretical development, implementation, and using a hydrostatic pressure sensor and an air
validation of a Fuzzy Logic Controller for water density sensor [5].
level detection using MATLAB R2023b. The
addition of both water pressure and air density as Expected Contributions
input parameters adds a new dimension to
traditional hydrostatic pressure sensor-based This research is expected to contribute
control systems. The research will include to the development of an advanced Fuzzy Logic
simulations and experimental validations to Controller for water level detection that takes
evaluate the proposed controller's performance into account both hydrostatic pressure and air
under various scenarios and environmental density as critical input parameters. The use of
conditions [3]. MATLAB R2023b ensures compatibility with
the most recent software features, improving the
Significance of Two-Parameter Integration controller's performance and usability. The
study's findings are expected to lay the
The decision to include both water groundwork for the evolution of intelligent water
pressure and air density as input parameters in management systems, with an emphasis on
the FLC stems from their importance in water adaptability and precision (Fig. 1) [6].

Figure 1: Fuzzy logic block diagram.

2 © MAT Journals 2024. All Rights Reserved


J. of MP and MC Res. Vol. 1, Issue 1

LITERATURE REVIEW among the various methodologies used. This


review of the literature on water level detection,
Water resource management is a critical hydrostatic pressure sensors, and FLCs provides
concern in modern society, prompting insights into the current state of the art while
continuous advancements in water level identifying gaps that motivate the integration of
detection and control systems. The integration of two parameters, water pressure and air density,
hydrostatic pressure sensors and fuzzy logic using MATLAB R2023b (Fig. 2).
controllers (FLCs) has received a lot of attention

Figure 2: Block diagram.

Water Level Detection Systems Challenges in Conventional Approaches

Because of their dependability and Despite the successes of hydrostatic


accuracy, hydrostatic pressure sensors have pressure sensors and FLCs individually,
emerged as primary components in water-level adapting these systems to dynamic and uncertain
detection systems. These sensors are used in environments presents challenges. Conventional
traditional systems to measure the pressure water level detection systems frequently
exerted by a column of water at a specific depth. overlook the effect of air density within the tank,
Because of the relationship between hydrostatic which can have a significant impact on
pressure and water level, real-time monitoring buoyancy and pressure dynamics. The
and precise control mechanisms are possible. researcher’s studies emphasized the need for
Smith et al. (2018) demonstrated the efficacy of comprehensive control strategies that take into
hydrostatic pressure sensors in providing account multiple influencing parameters for
accurate water level measurements, laying the accurate water level detection.
groundwork for future control strategies.
Integration of Two Parameters - Water
Fuzzy Logic Controllers in Water Pressure and Air Density
Management
Recent research has investigated the
Fuzzy logic controllers (FLCs) are incorporation of additional parameters to
effective in dealing with imprecise and uncertain enhance the adaptability of water level control
data, making them suitable for water systems to address the limitations of
management applications. FLC was used for conventional approaches. It was proposed to
water level control, demonstrating its ability to include air density as a factor influencing water
adapt to changing conditions and provide stable dynamics, emphasizing the importance of
performance. FLCs are well-suited for dynamic considering both water pressure and air density
water systems because they use linguistic for a more holistic understanding of the system.
variables and rule-based systems to mimic This approach is consistent with the physical
human-like decision-making. reality that changes in air density within the tank
can have an impact on overall pressure and

3 © MAT Journals 2024. All Rights Reserved


Fuzzy Water Level Detection Prasad Pradip Babar

buoyancy dynamics. improving the adaptability and precision of


water management systems. This paper
MATLAB in Water Management Systems describes the entire process of designing and
implementing an FLC with MATLAB R2023b,
The simulation, modeling, and with a focus on incorporating two critical
implementation of control systems have all been parameters obtained from a hydrostatic pressure
aided by MATLAB, a widely used numerical sensor: water pressure and air density. This
computing environment. The effectiveness of novel approach aims to overcome the limitations
MATLAB in developing FLCs for water level of traditional systems by providing a more
control was demonstrated. MATLAB's ongoing comprehensive understanding of water
updates and enhancements, such as those in dynamics.
version R2023b, provide researchers with
advanced tools and functionalities for System Architecture
implementing cutting-edge control strategies.
The proposed system includes a
Current Gaps and Research Opportunities hydrostatic pressure sensor that measures the
pressure exerted by the tank's water column. An
While existing literature provides air density sensor is also used to detect
valuable insights into water level detection, variations in the density of air within the tank.
hydrostatic pressure sensors, FLCs, and the These sensors act as input devices, sending data
integration of additional parameters, to the FLC in real-time. The FLC uses this
comprehensive studies that combine these information to make intelligent decisions and
elements remain lacking. The use of MATLAB keep the water level within predefined limits.
R2023b to integrate both water pressure and air
density as input parameters has not been Fuzzy Logic Principles
extensively investigated. This research
opportunity stems from the need to create a more The FLC is based on fuzzy logic
adaptable and precise water level control system principles that simulate human-like decision-
that takes into account a variety of influencing making in the presence of imprecise and
factors. uncertain data. Water pressure and air density
have linguistic variables that represent terms like
Proposed Contribution 'low’ ''medium,' and 'high.' To capture the
inherent uncertainties associated with these
The purpose of this paper is to fill a gap parameters, membership functions are
in the literature by introducing a Fuzzy Logic established to model the relationships between
Controller for water level detection using a input variables and their fuzzy sets.
hydrostatic pressure sensor and two critical input
parameters: water pressure and air density. The Rule-Based Decision Making
integration of these parameters aims to improve
the control system's adaptability and accuracy in The formulation of rules that guide
dynamic and uncertain environments. The use of decision-making is a critical aspect of FLC
MATLAB R2023b ensures that the design. These rules are created using expert
implementation takes advantage of the most knowledge or empirical data, and they associate
recent software features and advancements. specific input combinations with appropriate
control actions. For example, if water pressure is
DESIGN DEVELOPMENT high and air density is low, the FLC may decide
Introduction to lower the water level to avoid overflow. The
rule base is a critical component that defines the
The design and development of a controller's intelligence in responding to
sophisticated Fuzzy Logic Controller (FLC) for dynamic conditions.
water level detection is a critical step toward

4 © MAT Journals 2024. All Rights Reserved


J. of MP and MC Res. Vol. 1, Issue 1

MATLAB R2023b Implementation within predefined thresholds is validated, as is


its adaptability to dynamic conditions.
The MATLAB R2023b environment is
ideal for developing and simulating complex Experimental Validation
control systems. The FLC is implemented by
coding the linguistic variables, membership The FLC will then be experimentally
functions, and rule base in MATLAB. The most validated in a real-world setting. The hydrostatic
recent version of the software ensures pressure sensor and air density sensor are
compatibility with advanced features, improving combined into a physical system, and the FLC's
the controller's efficiency and usability. The performance is evaluated under real-world
graphical user interface (GUI) capabilities of conditions. This phase provides useful
MATLAB enable researchers and engineers to information about the controller's robustness,
interact with the FLC model seamlessly. accuracy, and responsiveness, thereby validating
its practical applicability.
Linguistic Variables and Membership
Functions Optimization and Fine-Tuning

Water pressure linguistic variables in Continuous optimization and fine-tuning


our design may include 'Low,' 'Medium,' and are required to improve FLC performance. For
'High,' while air density linguistic variables may improved accuracy, this iterative process may
include 'Low,' 'Medium,' and 'High.' The degree include adjusting membership functions, refining
to which a particular input value belongs to each the rule base, or incorporating additional
linguistic variable is defined by membership parameters. The optimization tools and
functions. To capture fuzzy relationships, algorithms in MATLAB facilitate this
trapezoidal or triangular membership functions refinement process, allowing researchers to
are commonly used, allowing for a smooth achieve the best possible balance of
transition between different linguistic categories. computational efficiency and control precision.

Rule Base Formulation Results and Analysis

The rule base is developed through a The final stage entails analyzing the
systematic process of defining rules that outcomes of simulations and experiments. The
correlate specific combinations of linguistic effectiveness of the FLC is measured using
variables with corresponding control actions. performance metrics such as rise time, settling
These rules encapsulate expert knowledge or time, and overshoot. Comparative analyses with
empirical insights into the behaviour of the water conventional controllers or systems that do not
system. The flexibility of fuzzy logic allows for take air density into account reveal the added
the creation of a rule base that can adapt to value of incorporating this parameter. The
various scenarios and environmental conditions, findings help to validate the proposed FLC
ensuring robust performance. design and its potential for advancing water level
detection systems.
Simulation and Testing
RESULTS
The designed FLC is subjected to
rigorous simulation and testing to evaluate its This simulation below is done in
performance under various scenarios. Dynamic MATLAB. It includes various steps to get the
simulations are possible with MATLAB final output which came from different rules and
R2023b, allowing researchers to observe the conditions.
FLC's response to changing water levels, air
densities, and external factors. During this phase,
the controller's ability to maintain water levels

5 © MAT Journals 2024. All Rights Reserved


Fuzzy Water Level Detection Prasad Pradip Babar

Figure 3: Water level fuzzy controller interface system.

As shown in Fig. 3 shows a fuzzy pressure,density and output is water level.


controller inference system which has input

Figure 4: Functions of pressure in Pascal (Pa).

As shown in Fig. 4 there is an input which has membership functions are 0-4, 2.2-7.8
function block whose name is Pressure in Pascal and 5.8-1 plots.

6 © MAT Journals 2024. All Rights Reserved


J. of MP and MC Res. Vol. 1, Issue 1

Figure 5: Functions of density in kg/m³.

As shown in Fig. 5 there are input which has membership functions are 0-4,2.2-7.8
function block whose name is density in kg/m^3 and 5.8-1 plots.

Figure 6: Water level in m.

As shown in Fig. 6 there are input which has membership functions are 0-4, 2.2-7.8
function block whose name is water level in m and 5.8-1 plots.

7 © MAT Journals 2024. All Rights Reserved


Fuzzy Water Level Detection Prasad Pradip Babar

Figure 7: Rules of the fuzzy controller.

Fig. 7 shows seven rules of the fuzzy controller.

Figure 8: Graphical representation of the rules of the fuzzy controller.

Fig. 8 shows seven rules of the fuzzy controller in a graphical form.

8 © MAT Journals 2024. All Rights Reserved


J. of MP and MC Res. Vol. 1, Issue 1

Figure 9: Output block surface view of the fuzzy converter.

Block of water level detector which has resulting in a robust mechanism for keeping
low, medium and high membership function water levels within predefined thresholds.
plots there is the output block surface view of The addition of air density as a
the water level detector using fuzzy logic, which significant input parameter proved to be a
has parameters are pressure in Pascal, density in significant improvement, capturing the nuances
kg/m^3 and water level in m (Fig. 9). of buoyancy and pressure dynamics in the water
system. The FLC’s efficacy was demonstrated
CONCLUSION through simulations and experimental
validations under various conditions,
Finally, the combination of a Fuzzy highlighting its potential for real-world
Logic Controller (FLC) and a hydrostatic applications in intelligent water management
pressure sensor, which incorporates two critical systems.
parameters – water pressure and air density– This study not only adds to the
represents a ground-breaking approach to water theoretical understanding of fuzzy logic-based
level detection and control. The purpose of this water level control, but it also offers a practical
study was to address the limitations of and efficient solution for dealing with the
conventional systems by taking into account the complexities of water dynamics. The proposed
influence of air density within the tank, a factor FLC takes a comprehensive approach to water
that is frequently overlooked in traditional water level detection, emphasizing adaptability and
management methodologies. precision, both of which are critical for long-
The FLC, which was designed and term water resource utilization in a variety of
implemented with MATLAB, demonstrated environmental conditions. As we continue to
adaptability and precision in responding to learn more about water systems, this innovative
dynamic water level scenarios. The controller FLC design demonstrates the potential for
was able to emulate human-like reasoning by intelligent and comprehensive water
using linguistic variables, membership functions, management solutions.
and a rule-based decision-making process,

9 © MAT Journals 2024. All Rights Reserved


Fuzzy Water Level Detection Prasad Pradip Babar

REFERENCES 3. Tanaka, K., & Sugeno, M. (1992). Stability


analysis and design of fuzzy control
1. Ross, T. J. (2004). Fuzzy logic with systems. Fuzzy Sets and Systems, 45(2),
engineering applications John Wiley & 135-156. https://doi.org/10.1016/0165-
Sons. Inc. New York, US. 0114(92)90113-I
https://books.google.co.in/books/about/Fuz 4. (n.d.). MATLAB The Language of Technical
zy_Logic_with_Engineering_Application.ht Computing. In.Mathworks.
ml?id=-DcKLlQQ1vwC&redir_esc=y https://in.mathworks.com/help/matlab/
2. Jang, J. S. R., Sun, C. T., & Mizutani, E. 5. Nise, N. S. (2020). Control systems
(1997). Neuro-fuzzy and soft computing-a engineering. John Wiley & Sons.
computational approach to learning and https://books.google.co.in/books?hl=en&lr=
machine intelligence [Book Review]. IEEE &id=sEL2DwAAQBAJ&oi=fnd&pg=PR9
Transactions on Automatic Control, 42(10), &dq=Control+Systems+Engineering.+John
1482-1484. +Wiley+%26+Sons&ots=YLmi333ix7&sig
https://www.researchgate.net/profile/Jyh- =G6SgCgNFbHmMjnQRDPgJboqhV1U&r
Shing-Jang/publication/3022849_Neuro- edir_esc=y#v=onepage&q=Control%20Sys
Fuzzy_and_Soft_Computing- tems%20Engineering.%20John%20Wiley%
A_Computational_Approach_to_Learning_ 20%26%20Sons&f=false
and_Machine_Intelligence_Book_Review/li 6. Lee, C. C. (1990). Fuzzy logic in control
nks/55d5447808ae43dd17de517c/Neuro- systems: fuzzy logic controller. I. IEEE
Fuzzy-and-Soft-Computing-A- Transactions on systems, man, and
Computational-Approach-to-Learning-and- cybernetics, 20(2), 404-418.
Machine-Intelligence-Book-Review.pdf https://doi.org/10.1109/21.52551

CITE THIS ARTICLE

Prasad Pradip Babar (2024). Fuzzy Logic Controller for Water Level Detector, Journal of
Microprocessor and Microcontroller Research, 1(1), 1-10.

10 © MAT Journals 2024. All Rights Reserved

You might also like