Clear Filters
Clear Filters

Why are my fuzzy rules and mf are not updating?

5 views (last 30 days)
Hello,
I have a problem with my fuzzy logic system: Any update to my rulebase or membership functions is not showing any effect on the simulation. My simulink file is somehow pulling the rules and mf from somewhere else, because even when I delete all the rules and mf, the simulation still shows the same results.
Any help is appreciated.
Thank you
  2 Comments
Julian
Julian on 9 Aug 2022
I am using the artificialPancreasWithFISTreeControl from the Fuzzy Toolbox examples.
I have copied the example into a separate directory and run the .mlx and .slx file from there.
Via command line I access the ruleviewer for the FIS1 via
ruleview(fisT.FIS(1));
I edit the rules and mf, run the simulation again via controller IO or simulink UI but it has zero effect.
I am fairly new to Matlab and Simulink and are not sure, if I am missing somethinge here. Do I need to compile everything again before running the simulation? Also, I save the .slx and .mlx but the rules and mf, are sometimes saved and sometime not.
Thank you!

Sign in to comment.

Answers (1)

Aman Banthia
Aman Banthia on 7 Oct 2023
Hi Julian,
It appears you are facing issues with your fuzzy logic system in MATLAB, specifically with the `artificialPancreasWithFISTreeControl` example from the Fuzzy Logic Toolbox. You are trying to modify the rule base and membership functions of your Fuzzy Inference System (FIS), but these changes do not seem to affect the simulation results. Even when you save your .slx and .mlx files, the rules and membership functions are sometimes saved and sometimes not.
Here are some steps to help troubleshoot your problem:
1. Saving Changes: After making changes in the rule viewer, ensure to save your changes. You can do this by clicking on "File" -> "Save System" or "File" -> "Export System". If this step is omitted, your changes may not be saved.
2. Updating FIS in Workspace: If you're making changes to the FIS using the rule viewer, you need to make sure that the updated FIS is being used in your Simulink model. You can export the updated FIS to the workspace (using "File" -> "Export System" in the rule viewer), and then update the FIS in your Simulink model to use this exported FIS.
3. Simulink Model Reference: Ensure that your Simulink model is referencing the updated FIS. If the FIS is defined in a MATLAB script or function, you'll need to rerun that script or function to update the FIS in the workspace.
4. Clearing Workspace: Consider clearing your MATLAB workspace before rerunning your simulation. This can help ensure that your Simulink model is using the latest version of the FIS.
5. Caching Issues: MATLAB might be using a cached version of your fuzzy inference system. Try clearing the cache using the `clear all` command before running your simulation.
Hope the above suggestions work.
Best Regards,
Aman Banthia

Categories

Find more on Fuzzy Logic in Simulink in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!