How can I solve a problem that is related to Fuzzy Logic Designer

29 visualizzazioni (ultimi 30 giorni)
ali
ali il 8 Set 2025 alle 9:44
Commentato: Sam Chak il 12 Set 2025 alle 11:24
Hi... I have designed a fuzzy controller that I want to tune. The dataset I currently have contains output from another software, recorded over time. Consider that I read two inputs and generate an output, and the resulting table provides data over a 60-second period. How can I import this dataset into MATLAB and use it for tuning my fuzzy controller?
Fuzzy Controller designed in Fuzzy Logic Designer app:
Data sample:

Risposte (1)

Sam Chak
Sam Chak il 10 Set 2025 alle 14:43
Hi @ali
To tune an initially-designed fuzzy controller using the app, you can generally follow the five simple steps outlined below:
Step 1: Read the data from the table in .xlsx or .csv format. The data sets will be loaded on the Workspace. In the Command Window, enter the following:
T = readtable("Data.xlsx", VariableNamingRule="preserve");
x = T{:,1}; % assign input data as 'x'
y = T{:,2}; % assign output data as 'y'
Then, open your designed fuzzy controller in the Fuzzy Logic Designer app. On the TUNING tab, load the input and output data (assigned as 'x' and 'y' in this example).
Step 2: Identify the desired tunable parameters for the input MFs, output MFs, and the If-Then rules. If you do not wish to tune certain parameters (typically known by experienced users and knowledge experts), uncheck the parameter index in the bottom right panel.
Step 3: Click the 'Tuning Option' button and select the desired optimization method for tuning purposes. The Genetic Algorithm is the default method.
Step 4: Click the 'Tune' button to initiate the tuning process. You may click the 'Stop' button when the desired accuracy is achieved.
Step 5: The final step is to visualize the error distribution. If the results are not satisfactory, adjust the tunable parameters, set constraints, and restart the tuning process.
  2 Commenti
ali
ali il 10 Set 2025 alle 16:15
thanks in advance ....if tuning gives gain to my fuzzy controll and how can it realize my goal or i have to select and found out it give me good response
Sam Chak
Sam Chak il 12 Set 2025 alle 11:24
Hi @ali
It is likely challenging to explain how to design or tune a fuzzy controller that provides a good response in just one or two sentences. Perhaps, if you provide the mathematical model of the system, I would be able to offer guidance.
Is your system modeled in state-space or as a transfer function?

Accedi per commentare.

Categorie

Scopri di più su Fuzzy Logic Toolbox in Help Center e File Exchange

Prodotti


Release

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by