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");
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.