Data Type Optimization Not Successful


You can use the fxpopt function to optimize the data types of a model or subsystem. Sometimes, the optimization is not successful. The following sections describe how to troubleshoot these cases.

Possible Solutions

Unable to Model Problem — No Constraints Specified

To determine if the behavior of a new fixed-point implementation is acceptable, the optimization requires well-defined behavioral constraints. Use the addTolerance method of the fxpOptimizationOptions class to specify numerical constraints for the optimized design.

Unable to Model Problem — Model is not Supported

The model containing the system you want to optimize must have the following characteristics:

  • All blocks in the model must support fixed-point data types.

  • The model cannot rely on data type override to establish baseline behavior.

  • The design ranges specified on blocks in the model must be consistent with the simulation ranges.

  • The data logging format of the model must be set to Dataset.

    To configure this setting, in the Configuration Parameters, in the Data Import/Export pane, set Format to Dataset.

  • The model must have finite simulation stop time.

Unable to Explore Results

When the optimization is not able to find a new valid result, the fxpopt function does not produce an OptimizationResult output. Invalid results are most often the result of using a model that is not supported for optimization. For more information, see Unable to Model Problem — No Constraints Specified Unable to Model Problem — Model is not Supported.

When the optimization is successful, you can explore several different implementations of your design that were found during the optimization process. Do not save the model until you are satisfied with the new design. Saving the model disables you from continuing to explore the other implementations.

See Also



Related Topics