首先我们在Matlab的命令窗口(command window)中输入fuzzy,回车就会出来这样一个窗口,进行模糊文件的编辑,完成之后,
然后
Export to disk
,即可得到一个.
fis
文件,这就是你所设计的模糊控制器。
在Fuzzy Logic Controller中导入前,
fis
编辑器(
MATLAB
的
command window
中键入
fuzzy
打开)中,
file-export-to workspace ;
常见报错:
1
、
MinMax blocks do not accept ‘boolean’ signals. The input signal(s) of block ‘mkkzq1/Subsystem/Fuzzy Logic Controller with Ruleviewer/Fuzzy Logic Controller/FIS Wizard/Defuzzification1/Max (COA)’ must be one of the MATLAB ‘uint8’, ‘uint16’, ‘uint32’, ‘int8’, ‘int16’, ‘int32’, ‘single’, or ‘double’ data types
2
、
An error occurred while propagating data type ‘boolean’ from block ‘mkkzq1/Subsystem/Fuzzy Logic Controller with Ruleviewer/Fuzzy Logic Controller/FIS Wizard/Defuzzification1/Zero Strength (COA)’, output port 1
。
以下是解决方案:
对于
7.0
版本,
simulink
模型窗口菜单中,
Simulation-Configuration-Parameters-Implement logic signals as boolean data
前面默认的勾选去掉