# Difference between revisions of "Fuzzy programming"

(→Applications: Expanded HVAC stuff) |
m (→Applications) |
||

Line 39: | Line 39: | ||

== Applications == | == Applications == | ||

− | Fuzzy Programming can be applied in a number of fields including media selection in advertising, automated braking in cars, water resource management, and control systems in HVAC systems. HVAC (Heating, Ventilation, and Air Condition) Systems are used to maintain a comfortable environment with a building, such as an office or school. The system works to maintain a certain temperature/humidity according to a set schedule. The system monitors the environment closely to understand when it has reach a certain set point. Fuzzy programming is applied to the control systems to create a more cost efficient systems as these HVAC systems can often be expensive to run. This is because the system might be aiming for that specific temperature and so to reach and maintain that exact degree, it could repeatedly turn on and off either the heating or air conditioning. This can result in a lot of wasted energy as opposed to dealing with a range of temperatures, which gives the system more flexibility as to when a certain subsystem needs to turn on. Compared to traditional PID (Proportional, Integral, Derivative) controller, the application of Fuzzy programming has been shown to be a more efficient way to run these systems [4]. | + | Fuzzy Programming can be applied in a number of fields including media selection in advertising, automated braking in cars, water resource management, and control systems in HVAC systems. HVAC (Heating, Ventilation, and Air Condition) Systems are used to maintain a comfortable environment with a building, such as an office or school. The system works to maintain a certain temperature/humidity according to a set schedule. The system monitors the environment closely to understand when it has reach a certain set point. Fuzzy programming is applied to the control systems to create a more cost efficient systems as these HVAC systems can often be expensive to run. This is because the system might be aiming for that specific temperature and so to reach and maintain that exact degree, it could repeatedly turn on and off either the heating or air conditioning. This can result in a lot of wasted energy as opposed to dealing with a range of temperatures, which gives the system more flexibility as to when a certain subsystem needs to turn on. Compared to the traditional PID (Proportional, Integral, Derivative) controller, the application of Fuzzy programming has been shown to be a more efficient way to run these systems [4]. |

== Example == | == Example == |

## Revision as of 22:46, 13 December 2020

Authors: Kyle Clark, Matt Schweider, Tommy Sheehan, Jarred Melancon (SYSEN 5800, Fall 2020)

Steward: Wei-Han Chen, Fengqi You

## Introduction

Fuzzy Programming is an optimization model that deals with performing optimization in the presence of uncertainty. This optimization technique is used when determining the exactness of a system's performance criteria/parameters and decision variables is not possible. Specifically, the truth values associated with the system can be completely false (0), completely true (1), or some value between the two extremes. This aims to capture the concept of partial truth. One approach to account for uncertainty in a system is to model the uncertainty using probability distributions, also known as statistical analysis. However, sometimes uncertainty is sometimes described using qualitative adjectives, or 'Fuzzy' statements, such as young or old and hot or cold, because exact boundaries do not necessarily exist [1].

Fuzzy Programming is built on the concept of Fuzzy Logic. The motivation for Fuzzy Logic, or more precisely Fuzzy Set Theory, is to accurately model and represent real world data which is often 'Fuzzy' due to uncertainty. This uncertainty can be introduced into a system by a number of factors such as imprecision in measurement tools or due to the use of vague language [2].

## Fuzzy Logic

While Boolean Logic is used to describe situations as completely true or completely false, Fuzzy Logic allows for a mathematical representation of partial truth or partial falsehood. Rather than having strict criteria for defining what is part of the set and what is not (e.g. hot or cold, young or old), we allow data to have a degree of membership (u) to each set. A membership function defines how each input value is mapped to a degree of membership (u) between the two extremes, 0 and 1. Membership functions can be several different types of functions. However, they are often Piece-Wise Linear Functions [3]. Below is an example of an L-Function.

For instance, let's say that we have a set of values that describe temperatures over the course of a week. In Boolean logic, we could create two sets, a cold set and a hot set. We could say that temperatures [0°F, 60°F) belong to the cold set and temperatures [60°F, 100°F] belong to the hot set. However, it is not very accurate to say that 60°F is cold, but 60.1°F is hot. Instead, we could use Fuzzy Logic to describe temperatures 0°F - 50°F as not hot (u=0). As temperatures increase from 50°F, they are given a higher degree of membership (u > 0) to describe that they are "hotter" or warmer. Lastly, temperatures above 70°F are definitely hot (u=1) [3].

## Flexible Mathematical Programming Method

An optimization technique used to implement Fuzzy Programming is Flexible Mathematical Programming. This kind of problem takes on the form of

where the "~" conveys the concept that the objective statement and constraints have some freedom in how they are satisfied. This approach is useful when strict satisfaction of the constraints creates an empty feasible set. Relaxing the constraints with the "~" allows for maneuverability within the potential solutions.

An easier way to represent the constraints is through the use of membership functions which are fuzzy sets of .

where represents the set of constraints which have a certain threshold that can be violated. The above membership functions are used to determine the degree of membership or how violated a certain constraint is. If , then the constraint is not violation. If , then the constraint is violated. The in between case of allows for partial violation of a constraint. The values of can be carefully selected to create constraints that allow for the desired amount of flexibility.

The above membership functions can be combined into a single piecewise function like the function shown within the Fuzzy Logic section of this page.

The optimal solution then becomes the value of x that provides the highest degree of membership while satisfying all constraints expressed by the above fuzzy sets or [4].

## Applications

Fuzzy Programming can be applied in a number of fields including media selection in advertising, automated braking in cars, water resource management, and control systems in HVAC systems. HVAC (Heating, Ventilation, and Air Condition) Systems are used to maintain a comfortable environment with a building, such as an office or school. The system works to maintain a certain temperature/humidity according to a set schedule. The system monitors the environment closely to understand when it has reach a certain set point. Fuzzy programming is applied to the control systems to create a more cost efficient systems as these HVAC systems can often be expensive to run. This is because the system might be aiming for that specific temperature and so to reach and maintain that exact degree, it could repeatedly turn on and off either the heating or air conditioning. This can result in a lot of wasted energy as opposed to dealing with a range of temperatures, which gives the system more flexibility as to when a certain subsystem needs to turn on. Compared to the traditional PID (Proportional, Integral, Derivative) controller, the application of Fuzzy programming has been shown to be a more efficient way to run these systems [4].

## Example

An example that showcases fuzzy logic can be described by a simple water allocation problem [1]. Suppose we have a scenario where we have 3 firms wishing to receive a certain amount of water from the flow of a river. Each firm has its own benefit from the water allocation and the amount of water allocated to all of the firms can't exceed the amount in the river or the amount of flow Q.

Our goal in this problem is to maximize the water allocation to three separate firms from a single source, in this case being a river. Therefore we get this optimization problem:

As we mentioned before, the total allocation of water for these three firms cannot exceed the total amount of water available, which will be represented by the variable Q. This value deducted from that total will be the amount of water that has to remain in the river, R, which gives us our value: . Using this will give us an idea of the water that can be allocated to the firms. For our case, we will assume that the value . Thus our new optimization function becomes:

.

With that constraint, the optimal solution will be giving a value of .

The problem depicted above was an example of a crisp problem where we knew the exact value for the limit of water to allocate. However, in the real world, we don't always have exact values; therefore, we can apply fuzzy logic to make the problem more realistic.

A fuzzy variant of this model would be when each firm's benefits are maximized. The first step for this fuzzy variant would be adding a new factor involving the membership function for each of the firms. The member function can be summed up into the equation below:

This has a similar constraint to the linear version in regards to the total water, . The optimal solution of this function is thus the same as the linear variant and the degree of satisfaction is . However, things begin to change when the total amount of units of water becomes **more or less 6 units** instead of just a crisp 6. The nomenclature "more or less 6 " is where we start to apply the fuzzy logic implying that the value will be around 6. Therefore we can classify the possibilities into membership functions around the values (5, 6, 7) adjusting the membership value between 0 and 1.

Adjusting the membership with these values yields the membership function:

Thus the overall optimization problem changes to a maximum/minimum dilemma where we are maximizing and minimizing :

This results in , and the total benefit being .

This result accounts for some uncertainty in our assumptions which is a common issue in a lot of real world problems which is why fuzzy programming is used in a lot of real world applications and controllers for various systems.

## Conclusion

The optimization technique of Fuzzy Programming is useful when qualitative adjectives are the only available descriptors for a system's performance criteria/parameters and decision variables. It's a vital tool that can help characterize and solve optimization models in the presence of uncertainty which are very common in the real world. The premise of Fuzzy Programming centers around Fuzzy Logic which allows for a mathematical representation of partial truth or partial falsehood rather than strict Boolean Logic system. Incorporating this partial state introduces a flexibility or "fuzziness" to the problem to allow it to better interpret imprecisions and unknowns we encounter in the real world data. Instead of fixed categories, we define degrees of membership to our function where we apply certain ranges or criteria which relate to different membership functions within our Fuzzy Set. Therefore, instead of the basic black and white scenario, we also consider the gray area between the two sets. Strict sets and precise measurements are nearly impossible to find in the real world so the use of Fuzzy Programming is essential to get optimal solutions that can accurately relate to real world situations. The versatility that it provides is precisely why it is so widely used in numerous controllers in all industries from HVAC systems to automated breaking systems.

## References

[1] Daniel P. Loucks, Eelco van Beek, Jery R. Stedinger, Jozef P.M. Dijkman, Monique T. Villars, *Water Resources Systems Planning and Management: An Introduction to Methods, Models, and Applications*, UNESCO, p.135-142, 2005.

[2] Nitin A. Bansod, Vaishali Kulkerni and S.H. Paul, *Soft Computing-A Fuzzy Logic Approach*, Bharati Vidyapeeth College of Engineering, p.73-74, 2005.

[3] MathWorks, (2020). *Foundations of Fuzzy Logic*, Retrieved November 6th, 2020 from https://www.mathworks.com/help/fuzzy/foundations-of-fuzzy-logic.html#:~:text=northern%20hemisphere%20climates).-,Membership%20Functions,name%20for%20a%20simple%20concept

[4] M.K. Luhandjula, *Fuzzy Mathematical Programming: Theory, Applications, and Extension*, University of South Africa Department of Decision Sciences, Journal of Uncertain Systems, Vol.1, No.2, p.124-136, 2007.