diff --git a/fuzzy-logic/.gitignore b/fuzzy-logic/.gitignore new file mode 100644 index 0000000..7aa2f69 --- /dev/null +++ b/fuzzy-logic/.gitignore @@ -0,0 +1,113 @@ +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc + +## Intermediate documents: +*.dvi +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.brf +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Auxiliary and intermediate files from other packages: + +# algorithms +*.alg +*.loa + +# amsthm +*.thm + +# beamer +*.nav +*.snm +*.vrb + +#(e)ledmac/(e)ledpar +*.end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls + +# hyperref +*.brf + +# listings +*.lol + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# minitoc +*.maf +*.mtc +*.mtc0 + +# minted +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlo + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# todonotes +*.tdo + +# xindy +*.xdy + +# add files starting with +~* +.~* diff --git a/fuzzy-logic/README.md b/fuzzy-logic/README.md new file mode 100644 index 0000000..d4ded39 --- /dev/null +++ b/fuzzy-logic/README.md @@ -0,0 +1,27 @@ +# Presentation +[fuzzy.pdf](https://github.com/peterbabic/fuzzy-logic-presentation/blob/master/fuzzy.pdf) + +# Assignment +The aim is: You choose an application of fuzzy logic and you have to answer +the following questions: + +1) what research groups or R & D groups have developed it? (to do this you use +on the web: bibliographic database container containing abstracts and +citations for academic journal articles). + +2) State of the art + +4) What automatic demonstrator uses? + +3) What level of development has ?: Is there software developed? + +You will have noted that the bibliographic citations that use must be updated +dates + +Work will be descriptive, expressed with your regular expressions (in your +case, in English). Think that an employer wants to know if you can develop +this application + +I will not develop any classroom application example, because my goal is to +assess your ability to search, test your knowledge with the challenge of +convincing the employer, etc. diff --git a/fuzzy-logic/bibliography.bib b/fuzzy-logic/bibliography.bib new file mode 100644 index 0000000..a315115 --- /dev/null +++ b/fuzzy-logic/bibliography.bib @@ -0,0 +1,54 @@ +@book{lughofer2011evolving, + title={Evolving Fuzzy Systems - Methodologies, Advanced Concepts and Applications}, + author={Lughofer, E.}, + isbn={9783642180873}, + series={Studies in Fuzziness and Soft Computing}, + year={2011}, + publisher={Springer Berlin Heidelberg}, + pages=269 +} + +@book{podosky1985vagueness, + publisher={Monash University}, + title={Vagueness, Bivalence and the Sorites Paradox}, + author={Podosky, M.P.}, + year={1985} +} + +@book{buckley2002introduction, + title={An Introduction to Fuzzy Logic and Fuzzy Sets}, + author={Buckley, J.J. and Eslami, E.}, + isbn={9783790814477}, + lccn={20025287}, + series={Advances in Intelligent and Soft Computing}, + year={2002}, + publisher={Physica-Verlag HD}, + pages=21 +} + +@book{ross2009fuzzy, + title={Fuzzy Logic with Engineering Applications}, + author={Ross, T.J.}, + isbn={9780470748510}, + lccn={2009033736}, + year={2009}, + publisher={Wiley} +} + +@book{lieb1993linguistic, + title={Linguistic Variables: Towards a unified theory of linguistic variation}, + author={Lieb, H.H.}, + isbn={9789027277039}, + series={Current Issues in Linguistic Theory}, + year={1993}, + publisher={John Benjamins Publishing Company}, + pages=144 +} + +@book{rajasekaran2003neural, + title={NEURAL NETWORKS, FUZZY LOGIC AND GENETIC ALGORITHM: SYNTHESIS AND APPLICATIONS (WITH CD)}, + author={RAJASEKARAN, S. and PAI, G.A.V.}, + isbn={9788120321861}, + year={2003}, + publisher={PHI Learning} +} diff --git a/fuzzy-logic/figures/crisp-set.jpg b/fuzzy-logic/figures/crisp-set.jpg new file mode 100644 index 0000000..d8f343c Binary files /dev/null and b/fuzzy-logic/figures/crisp-set.jpg differ diff --git a/fuzzy-logic/figures/figures.odg b/fuzzy-logic/figures/figures.odg new file mode 100644 index 0000000..6d8e9a7 Binary files /dev/null and b/fuzzy-logic/figures/figures.odg differ diff --git a/fuzzy-logic/figures/fuzzy-control-block.jpg b/fuzzy-logic/figures/fuzzy-control-block.jpg new file mode 100644 index 0000000..66055ec Binary files /dev/null and b/fuzzy-logic/figures/fuzzy-control-block.jpg differ diff --git a/fuzzy-logic/figures/fuzzy-crisp.jpg b/fuzzy-logic/figures/fuzzy-crisp.jpg new file mode 100644 index 0000000..1c9a268 Binary files /dev/null and b/fuzzy-logic/figures/fuzzy-crisp.jpg differ diff --git a/fuzzy-logic/figures/fuzzy-set-degrees.jpg b/fuzzy-logic/figures/fuzzy-set-degrees.jpg new file mode 100644 index 0000000..a41e7ac Binary files /dev/null and b/fuzzy-logic/figures/fuzzy-set-degrees.jpg differ diff --git a/fuzzy-logic/figures/fuzzy-set-op.jpg b/fuzzy-logic/figures/fuzzy-set-op.jpg new file mode 100644 index 0000000..b8581f7 Binary files /dev/null and b/fuzzy-logic/figures/fuzzy-set-op.jpg differ diff --git a/fuzzy-logic/figures/fuzzy-set.jpg b/fuzzy-logic/figures/fuzzy-set.jpg new file mode 100644 index 0000000..8e86e68 Binary files /dev/null and b/fuzzy-logic/figures/fuzzy-set.jpg differ diff --git a/fuzzy-logic/figures/lofti.jpg b/fuzzy-logic/figures/lofti.jpg new file mode 100644 index 0000000..c47a652 Binary files /dev/null and b/fuzzy-logic/figures/lofti.jpg differ diff --git a/fuzzy-logic/figures/luk-tnorm.png b/fuzzy-logic/figures/luk-tnorm.png new file mode 100644 index 0000000..b8c0f6a Binary files /dev/null and b/fuzzy-logic/figures/luk-tnorm.png differ diff --git a/fuzzy-logic/figures/min-tnorm.png b/fuzzy-logic/figures/min-tnorm.png new file mode 100644 index 0000000..b93cbba Binary files /dev/null and b/fuzzy-logic/figures/min-tnorm.png differ diff --git a/fuzzy-logic/figures/product-tnorm.png b/fuzzy-logic/figures/product-tnorm.png new file mode 100644 index 0000000..a74b694 Binary files /dev/null and b/fuzzy-logic/figures/product-tnorm.png differ diff --git a/fuzzy-logic/figures/sorites-gradient.jpg b/fuzzy-logic/figures/sorites-gradient.jpg new file mode 100644 index 0000000..e334966 Binary files /dev/null and b/fuzzy-logic/figures/sorites-gradient.jpg differ diff --git a/fuzzy-logic/fuzzy.pdf b/fuzzy-logic/fuzzy.pdf new file mode 100644 index 0000000..5233548 Binary files /dev/null and b/fuzzy-logic/fuzzy.pdf differ diff --git a/fuzzy-logic/fuzzy.tex b/fuzzy-logic/fuzzy.tex new file mode 100644 index 0000000..34c0950 --- /dev/null +++ b/fuzzy-logic/fuzzy.tex @@ -0,0 +1,359 @@ +\documentclass[hyperref={unicode}]{beamer} +% +% Choose how your presentation looks. +% +% For more themes, color themes and font themes, see: +% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html +% +\mode +{ + \usetheme{Antibes} % or try Darmstadt, Madrid, Warsaw, ... + \usecolortheme{dolphin} % or try albatross, beaver, crane, ... + \usefonttheme{professionalfonts} % or try serif, structurebold, ... + \setbeamertemplate{navigation symbols}{} + \setbeamertemplate{caption}[numbered] + % Numbered bibiolgraphy items + \setbeamertemplate{bibliography item}{\insertbiblabel} +} + +\usepackage[utf8]{inputenc} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage{csquotes,lmodern,silence,multicol} +\usepackage[style=numeric-comp,backend=biber]{biblatex} + +\WarningFilter{biblatex}{Patching footnotes failed} + +% Remove small caps warning +\renewcommand\mkbibacro[1]{{\footnotesize\MakeUppercase{#1}}} + +\addbibresource{bibliography.bib} +\graphicspath{{figures/}} + +\title[Fuzzy logic]{Fuzzy Logic} +\author{Jakub Hanák, Peter Babič} +\institute{Technical University of Košice, Slovakia} +\date{18.05.2015} + +\begin{document} +\boldmath + + +\begin{frame} + \titlepage +\end{frame} + +\begin{frame}{Presentation Outline} +%\begin{multicols}{2} + \tableofcontents +%\end{multicols} +\end{frame} + + + +\section{Introduction} + + +\subsection{Crisp and Fuzzy Logic} + +\begin{frame}{Introduction to Fuzzy logic} + \begin{columns} + \column{.6\textwidth} + \begin{itemize} + \item Fuzzy logic is an extension of Boolean logic + \item Natural language rules + \item Aristotle, later Lofti A. Zadeh in 1965 and 1973 + \item Japan, later on west + \end{itemize} + + \column{.35\textwidth} + \begin{figure}[b] + \includegraphics{lofti.jpg} + \caption{Lofti A. Zadeh} + \end{figure} + \end{columns} +\end{frame} + + +\begin{frame}{Fuzzy logic vs Crisp logic} + \begin{exampleblock}{Example} + Carmen is 18 years old. Is she old? + \end{exampleblock} + + \begin{itemize} + \setlength{\itemindent}{2cm} + \item[Crisp\footnote{In this context referred also as a \emph{Boolean} or \emph{bivalent} logic}] \textbf{true}/\textbf{false} + \item[Fuzzy] \textbf{true}, \textbf{false} or the \textbf{degree} of \textit{oldness} + \end{itemize} + + \begin{figure} + \includegraphics[width=.5\textwidth]{fuzzy-crisp.jpg} + \caption{The classical set theory is a subset of the theory of fuzzy sets} + \end{figure} +\end{frame} + +\begin{frame}{Crisp Set} + Theory of Sets (formerly Classes) was conceptualized by George Cantor in 1870's. + \begin{figure} + \includegraphics[width=.75\textwidth]{crisp-set.jpg} + \caption{Crisp set illustration. The element either is fully member of a set or is not a member at all.} + \end{figure} +\end{frame} + +\begin{frame}{Sorites Paradox \cite{podosky1985vagueness}} + When does a heap of grains stops being heap, if we are removing one grain at a time? + + \begin{figure} + \includegraphics[width=.75\textwidth]{sorites-gradient.jpg} + \caption{At what point exactly does blue becomes red?} + \end{figure} + + $$Bald(0)$$ + $$Bald(n)\rightarrow Bald(n+1)$$ + $$\therefore Bald(10000)$$ +\end{frame} + +\subsection{Fuzzy Sets} + +\begin{frame}{Fuzzy Sets} + In mathematics, fuzzy sets are sets whose elements have \textit{degrees} of membership, described by a \textit{membership function} \cite{buckley2002introduction}. + + \vskip .5cm + \begin{itemize} + \item Degree of membership is defined in interval\footnote{In theory, it could be higher than 1, but in practice it is almost never used} $[0, 1]$ + \item Elements can have different degree of membership to different fuzzy sets + \item If the uncertainty is not handled, we talk about \textbf{type-1} fuzzy sets, \textbf{type-2} otherwise + \end{itemize} +\end{frame} + +\begin{frame}{Fuzzy Set Interpretation} + How do we represent \textit{numerical} value in a fuzzy set? With the use of \textit{linguistic variables} \cite{lieb1993linguistic}, \textbf{not} probabilities. + \begin{figure} + \includegraphics[width=.75\textwidth]{fuzzy-set-degrees.jpg} + \caption{Example interpretation of fuzzy sets. At the given temperature point, we can tell that the measured medium is "not hot", "slightly warm" and "almost cold". It does not mean that the chance the water is cold is 75\%. + \label{fig:fuzzy-set}} + \end{figure} +\end{frame} + +\begin{frame}{Formal Definitions} + \begin{block}{Definition} + Let $U$ be the \textit{universe of discourse} and $x$ be the element in it. The \textit{membership function} $\mu_A$ is defined as: + $$\mu_A:X\rightarrow[0,1]$$ + \end{block} + \begin{block}{Definition} + A fuzzy set $A$ is expressed as a set of ordered pairs, given that $\mu_A(x)$ is a degree, to which $x$ a member of $A$: + $$A=\{(x,\mu_A(x))\,|\,x \in U\}$$ + \end{block} +\end{frame} + +\begin{frame}{Standard Fuzzy Set Operations} + Given that $A,B\in U$ and $u$ is an element in universe $U$: + \vskip .5cm + \begin{itemize} + \setlength{\itemindent}{3cm} + \item[Complement] $\mu_A(u)=1-\mu_A(u)$ + \item[Intersection] $\mu_{A\cap B}(u)=min\{\mu_A(u),\mu_B(u)\}$ + \item[Union] $\mu_{A\cup B}(u)=max\{\mu_A(u),\mu_B(u)\}$ + \end{itemize} + + \begin{figure} + \includegraphics[width=.95\textwidth]{fuzzy-set-op.jpg} + \caption{The complement $\mathbf{\mu_{\bar A}}$, the intersection $\mathbf{\mu_{A\cap B}}$ and the union $\mathbf{\mu_{A\cup B}}$ (green).} + \end{figure} +\end{frame} + +\begin{frame}{Fuzzy Set Operations Truth Tables} + \begin{table} + \caption{The truth tables for \textbf{AND}, \textbf{OR} and \textbf{NOT} operations} + \begin{tabular}{|c|c|c|} + \hline + \rule[-1ex]{0pt}{2.5ex} \textbf{A} & \textbf{B} & \textbf{min(A,B)} \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 0 & 0 & 0 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 0 & 1 & 0 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 1 & 0 & 0 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 1 & 1 & 1 \\ + \hline + \end{tabular} + \hskip .5cm + \begin{tabular}{|c|c|c|} + \hline + \rule[-1ex]{0pt}{2.5ex} \textbf{A} & \textbf{B} & \textbf{max(A,B)} \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 0 & 0 & 0 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 0 & 1 & 1 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 1 & 0 & 1 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 1 & 1 & 1 \\ + \hline + \end{tabular} + \hskip .5cm + \begin{tabular}{|c|c|} + \hline + \rule[-1ex]{0pt}{2.5ex} \textbf{A} & \textbf{1-A} \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 1 & 0 \\ + \hline + \rule[-1ex]{0pt}{2.5ex} 0 & 1 \\ + \hline + \end{tabular} + \end{table} + + \vskip .5cm + It is no coincidence, that these truth tables for binary fuzzy sets are identical to their Boolean counterparts\footnote{DeMorgan's law, associativity, comutativity and distributivity also apply.}. +\end{frame} + +\begin{frame}{Triangular Norm (T-norm)} + A T-norm is a \textbf{continuous} function $T:[0,1]\times [0,1]\rightarrow [0,1]$, satisfying these axioms: + \begin{itemize} + + \vskip .5cm + \setlength{\itemindent}{3cm} + \item[Neutrality\footnote{Also referred to as a \emph{boundary condition}.}] $T(a, 1) = a$ + \item[Commutativity] $T(a,b)=T(b,a)$ + \item[Monotonicity] $T(a,b) \le T(c,d)\;if\;a \le c\;and\;b \le d$ + \item[Associativity] $T(a, T(b, c)) = T(T(a, b), c)$ +% \item[Subidempotency] $T(a,a)\le a$ + \end{itemize} + + \vskip .5cm + T-norm is used to customize the fuzzy \textbf{intersection} (conjunction). + The fuzzy \textbf{union} (disjunction) uses the S-norm (or T-conorm). +\end{frame} + +\begin{frame}{The Most Common T-norms} + $$\mathsf{T_{min}}(a,b)=min\{a,b\}$$ + \begin{figure} + \includegraphics[width=.95\textwidth]{min-tnorm.png} + \caption{\textbf{Minimum} (G{\"o}del) T-norm is the most common one} + \end{figure} +\end{frame} + +\begin{frame}{The Most Common T-norms} + $$\mathsf{T_{prod}}(a,b)=a \cdot b$$ + \begin{figure} + \includegraphics[width=.95\textwidth]{product-tnorm.png} + \caption{\textbf{product} T-norm} + \end{figure} +\end{frame} + +\begin{frame}{The Most Common T-norms} + $$\mathsf{T_{Luk}}(a,b)=max\{0,\:a+b-1\}$$ + \begin{figure} + \includegraphics[width=.95\textwidth]{luk-tnorm.png} + \caption{\textbf{{\L}ukasiewics} T-norm} + \end{figure} +\end{frame} + + +%\addtocontents{toc}{\newpage} +\section{Applications} + + +\subsection{Fuzzy Control} + +\begin{frame}{Fuzzy Control} + \begin{itemize} + \item The wider application of the fuzzy logic \cite{lughofer2011evolving} + \item Easier to mechanize tasks that are already successfully performed by humans + \end{itemize} + + % lughofer2011evolving, mamdani inference + \begin{figure} + \includegraphics[width=.75\textwidth]{fuzzy-control-block.jpg} + \caption{Block diagram of a fuzzy control} + \end{figure} +\end{frame} + + +\begin{frame}{Fuzzy Control Applications \cite{ross2009fuzzy}} + \begin{itemize} + \item Camera autofocus by Canon + \item Increased effectivity of Mutsushita vacuum robots + \item Mitsubishi air conditioner with higher efficiency and lower sensors + \item Handwriting recognition, elevator systems, self-balancing robots +% \item Simple, low cost $\rightarrow$ many more \dots + \end{itemize} + + \vskip .5cm + The fuzzy control systems are commonly used where there are not enough resources for highly advanced systems like \textbf{PID\footnote{Proportional-integral-derivative} controller}, \textbf{Artificial neural network} or \textbf{Genetic algorithm} \cite{rajasekaran2003neural}. +\end{frame} + + +\section{Final Remarks} + + +\subsection{References} + +\begin{frame}[allowframebreaks]{References} + \printbibliography +\end{frame} + + +\subsection{Epilogue} + +\begin{frame}{Questions?} + \centering + {\large Thank you $\cdot$ !`Gracias! $\cdot$ Ďakujeme} +\end{frame} + +\end{document} + + + + +%\begin{frame}{Blocks} +% +% \begin{block}{This is a Block} +% This is important information +% \end{block} +% +% \begin{alertblock}{This is an Alert block} +% This is an important alert +% \end{alertblock} +% +% +% \begin{exampleblock}{This is an Example block} +% This is an example +% \end{exampleblock} +% +%\end{frame} + + +%\begin{itemize} +%\item Use \texttt{tabular} for Basic Tables! --- See Table~\ref{tab:widgets}, for Example. +%\item You Can Upload a Figure (JPEG, PNG or PDF) Using the Files Menu. +%\item to Include It in Your Document, Use the \texttt{includegraphics} Command (See the Comment Below in the Source Code). +%\end{itemize} + + +%\begin{table} +%\centering +%\begin{tabular}{l|r} +%Item & Quantity \\\hline +%Widgets & 42 \\ +%Gadgets & 13 +%\end{tabular} +%\caption{\label{tab:widgets}An example table.} +%\end{table} + + + +% Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let +% $$S_n = \frac{X_1 + X_2 + \cdots + X_n}{n} +% = \frac{1}{n}\sum_{i}^{n} X_i$$ +% denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$. + + + + +% \vskip 1cm + +% \begin{block}{Examples} +% Some examples of commonly used commands and features are included, to help you get started. +% \end{block}