# Fuzzy programming

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

## 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 .

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 .

## 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 . Below is an example of an L-Function.

$u_{A}(x)={\begin{cases}0,\qquad x\leq b\\{\frac {x-a}{b-a}},\quad a\leq x\leq b\\1,\qquad x>b\end{cases}}$ 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) .

## 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

${\begin{cases}{\tilde {min}}f(x)\\s.t.\ g_{i}(x)\leq \sim b_{i};i=1,...,m\\x\in X=\{x\in \mathbb {R} ^{2}|x\geq 0\}\end{cases}}$ 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 $\mathbb {R}$ .

$u_{i}(x)=0\qquad \ \ \ if\ g_{i}(x)>b_{i}+d_{i}$ $u_{i}(x)\in (0,1)\quad if\ b_{i} $u_{i}(x)=1\qquad \ \ if\ g_{i}(x)\leq b_{i}$ where $d_{i}(i=1,...,m)$ 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 $u_{i}(x)=1$ , then the constraint is not violation. If $u_{i}(x)=0$ , then the constraint is violated. The in between case of $u_{i}(x)\in (0,1)$ allows for partial violation of a constraint. The values of $d_{i}(i=1,...,m)$ 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.

$u_{i}(x)={\begin{cases}1,\qquad \qquad \quad \ if\ g_{i}(x)\leq b_{i}\\1-{\frac {g_{i}(x)-b_{i}}{d_{i}}},\quad if\ b_{i}b_{i}+d_{i}\end{cases}}$ 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 $maximize\ u_{D}(x)=min\ u_{i}(x)$ .

## 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 .

## Example

An example that showcases fuzzy logic can be described by a simple water allocation problem . 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:

${\textstyle max\ \ TB(X)=(6x_{1}-x_{1}^{2})+(7x_{2}-1.5x_{2}^{2})+(8x_{3}-0.5x_{3}^{2})}$ $s.t.\ x_{1}+x_{2}+x_{3}\leq K$ ${\textstyle x_{i}\geq 0\ \ i=1,2,3}$ 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: $Q-R=K$ . 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 $K=6$ . Thus our new optimization function becomes:

${\textstyle max\ \ TB(X)=(6x_{1}-x_{1}^{2})+(7x_{2}-1.5x_{2}^{2})+(8x_{3}-0.5x_{3}^{2})}$ ${\textstyle s.t.\ x_{1}+x_{2}+x_{3}\leq 6}$ .

${\textstyle x_{i}\geq 0\ \ i=1,2,3}$ With that constraint, the optimal solution will be $x_{1}=1,x_{2}=1,x_{3}=4,$ giving a value of $TB(X)=34.5$ .

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:

$m(X)=[(6x_{1}-x_{1}^{2})+(7x_{2}-1.5x_{2}^{2})+(8x_{3}-0.5x_{3}^{2})]/49.17$ This has a similar constraint to the linear version in regards to the total water, ${\textstyle x_{1}+x_{2}+x_{3}\leq 6}$ . The optimal solution of this function is thus the same as the linear variant and the degree of satisfaction is $m(X)=0.7$ . 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:

$m_{c}(x)={\begin{cases}1,\qquad \qquad \quad \ if\ x_{1}+x_{2}+x_{3}\leq 5\\{\frac {7-(x_{1}+x_{2}+x_{3})}{2}},\quad \ if\ 57\end{cases}}$ Thus the overall optimization problem changes to a maximum/minimum dilemma where we are maximizing $M_{G}(X)$ and minimizing $M_{C}(X)$ :

$m_{G}(X)=[(6x_{1}-x_{1}^{2})+(7x_{2}-1.5x_{2}^{2})+(8x_{3}-0.5x_{3}^{2})]/49.17$ $m_{C}(X)=[7-(x_{1}+x_{2}+x_{3})]/2$ This results in $x_{1}=0.91,x_{2}=0.94,x_{3}=3.81,m(X)=0.67$ , and the total benefit being $TB(X)=33.1$ .

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.