Why do I receive an error about Boolean data types when simulating a Fuzzy Logic controller in Simulink 5.0 (R13)?

11 views (last 30 days)
I have a Simulink model which uses a Fuzzy Logic controller. When I run the model, I receive the following error message:
Data type mismatch. Input port 2 of block 'fuzzy_controller_TMW/Fuzzy Logic Controller/FIS Wizard/Error/NB/ZMF/Product' expects a signal of data type 'double'. However, it is driven by a signal of data type 'boolean'
A similar error is produced when I try to build my model using Real-Time Workshop:
Error executing build command: Error using ==> make_rtw
Error using ==> rtwgen
--> Data type mismatch. Input port 2 of block 'fuzzy_pdi_controller/Fuzzy Logic Controller/FIS Wizard/Error/NB/ZMF/Product' expects a signal of data type 'double'. However, it is driven by a signal of data type 'boolean'.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, read below for any possible workarounds:
This is a bug in Fuzzy Logic Toolbox 2.1 (R13) in the way that Fuzzy Logic handles Simulink Boolean data types.
To work around this issue, try the following:
In your Simulink model, go to the Advanced tab of the Simulation parameters dialog box and turn off "Boolean logic signals" located under the Optimizations section.
This problem will affect any fuzzy system using one of the following membership functions:
Gaussian2
Pi-Shaped
S-Shaped
Z-Shaped

More Answers (0)

Categories

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

Community Treasure Hunt

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

Start Hunting!