How to build a Fuzzy Logic Controller for a fixed-point target?
9 views (last 30 days)
Show older comments
Hello everybody,
I am currently trying to generate code for a fuzzy logic controller. The controller works perfectly with 'double' selected as data type. However, I need the controller to work on a fixed-point target and the block itself seems to support this. When I change the block setting to fixed-point data, I get the attached error messages when trying to run a simulation or build the model. I am sure there is a workaround for this as the setting for fixed-point data is available in the fuzzy block. I also tried the fixed-point tool without success.
Any help on this would be greatly appreciated. Thanks!
Chris
Function 'exp' is not defined for values of class 'embedded.fi'.
Function 'Evaluate Rule Antecedents' (#257.729.853), line 23, column 5:
"[antecedentOutputs,sumAntecedentOutputs] = ..."
Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Undefined function or variable 'antecedentOutputs'. The first assignment to a local variable determines its class.
Function 'Evaluate Rule Antecedents' (#257.730.747), line 23, column 6:
"antecedentOutputs"
Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Undefined function or variable 'sumAntecedentOutputs'. The first assignment to a local variable determines its class.
Function 'Evaluate Rule Antecedents' (#257.748.768), line 23, column 24:
"sumAntecedentOutputs"
Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Errors occurred during parsing of MATLAB function 'Evaluate Rule Antecedents'
Component:MATLAB Function | Category:Coder error
Simulink cannot determine sizes and/or types of the outputs for block 'Evaluate Rule Antecedents' due to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs.
Component:MATLAB Function | Category:Coder error
### Build procedure for model: 'FuzzyController' aborted due to an error.
Simulink cannot determine sizes and/or types of the outputs for block 'Evaluate Rule Antecedents' due to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs.
Component:Simulink | Category:Block diagram errorOpen
An error occurred while propagating data type 'sfix16_En2' through 'FuzzyController/Fuzzy Logic Controller/Evaluate Rule Antecedents'.
0 Comments
Answers (0)
See Also
Categories
Find more on Fixed-Point Designer 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!