Why am I receiving an error about invalid port dimensions when using a Fuzzy Logic Controller in Simulink?

4 views (last 30 days)
I have created a FIS structure using the Fuzzy Logic Toolbox. This structure is to be used in Simulink with the Fuzzy Logic Controller block. When I run the Simulink model I get an error.
Error in port widths or dimensions. Invalid dimension has been specified for input port 1 of
block 'myfis/Fuzzy Logic Controller with Ruleviewer/Fuzzy Logic Controller/FIS Wizard/power'.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This error will occur if the dimension of the input signal to the Fuzzy Logic Controller block does not match the number of inputs the FIS object is expecting. To check how many inputs a FIS object is expecting, try the following:
fis = readfis('tipper.fis')
You should get the following output:
fis =
name: 'tipper'
type: 'mamdani'
andMethod: 'min'
orMethod: 'max'
defuzzMethod: 'centroid'
impMethod: 'min'
aggMethod: 'max'
input: [1x2 struct]
output: [1x1 struct]
rule: [1x3 struct]
The input is a 1-by-2 structure array indicating that this FIS object is expecting 2 inputs. In Simulink, the dimension of the input to the Fuzzy Logic Controller block needs to have a value of 2.

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!