How do I deploy singleton membership function in fuzzy logic output

15 ビュー (過去 30 日間)
Evans
Evans 2024 年 2 月 22 日
コメント済み: Sam Chak 2024 年 2 月 24 日
I’m deploying fuzzy logic with two inputs and a single out but the output should be singleton in simulink. Then I ask, how may I apply the fuzzy singleton membership function ?

回答 (1 件)

Sam Chak
Sam Chak 2024 年 2 月 22 日
Here's how you can create fuzzy singleton membership functions. In this code snippet, I'm using three singletons.
% Fuzzy Singleton Outputs
fis = addOutput(fis, [-1 +1], 'Name', 'Out');
fis = addMF(fis, 'Out', 'constant', -1, 'Name', 'N'); % Negative output action
fis = addMF(fis, 'Out', 'constant', 0, 'Name', 'Z'); % No output action
fis = addMF(fis, 'Out', 'constant', +1, 'Name', 'P'); % Positive output action
  2 件のコメント
Evans
Evans 2024 年 2 月 24 日
hello @Sam Chak
Please i tried running the code but i kept getting an error
Sam Chak
Sam Chak 2024 年 2 月 24 日
Your question initially revolved around the singleton membership function, so I focused solely on that aspect, drawing from this documentation detailing how to incorporate singleton MFs (constants) into a fuzzy output variable within the Sugeno fuzzy inference system (fis object).
Given your mention of constructing a fuzzy system with two inputs and a single output, I proceeded under the assumption that you had already successfully established a fuzzy system (fuzzydc.fis object) with two fuzzy inputs. If you're interested in building a fuzzy system entirely through MATLAB code, I recommend consulting this article:
Alternatively, if you prefer a more intuitive approach, I personally favor using the Fuzzy Logic Designer app. Its WYSIWYG (What You See Is What You Get) interface provides a user-friendly platform for visualizing and adjusting the design parameters of the fuzzy system.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by