Main Content

DataTypeWorkflow.findDecoupledSubsystems

Get a list of subsystems to replace with an approximation

Description

systemsToApproximate = DataTypeWorkflow.findDecoupledSubsystems(system)returns a table containing all of the subsystems in the system specified by system created by the Fixed-Point Tool during the preparation stage of conversion.

When converting a model to fixed point using the Fixed-Point Tool, when you click Prepare, the tool finds any blocks that are not supported for conversion. When the tool finds these blocks, it isolates the block by placing it in a subsystem surrounded by Data Type Conversion blocks. After converting the rest of the system to fixed point, use this function to get a list of all the subsystems you must replace. You can use the Lookup Table Optimizer to generate a lookup table approximation of the subsystems containing the unsupported blocks.

example

Examples

collapse all

In this example, you replace a block that is not supported for fixed-point conversion, with a lookup table approximation.

Open the model.

open_system('ex_fixed_point_workflow_lutapprox')

The Controller Subsystem in the model uses fixed-point data types, except in the Exp subsystem. This subsystem was created by the Fixed-Point Tool during the preparation stage of the conversion. In this example, you use the Lookup Table Optimizer to replace this subsystem with a lookup table approximation.

Identify the subsystems that you need to replace using the DataTypeWorkflow.findDecoupledSubsystems function.

decoupled = DataTypeWorkflow.findDecoupledSubsystems(gcs)
decoupled =

  1x2 table

    ID                              BlockPath                           
    __    ______________________________________________________________

    1     {'ex_fixed_point_workflow_lutapprox/Controller Subsystem/Exp'}

To replace the functions, open the Lookup Table Optimizer. In the Simulink Apps tab, select Lookup Table Optimizer.

On the Objective page of the Lookup Table Optimizer, select Simulink Block. Click Next.

Under Block Information, copy and paste the path to the decoupled subsystem created by the Fixed-Point Tool.

Continue through the steps of the Lookup Table Optimizer to generate the lookup table approximation.

Input Arguments

collapse all

System containing the decoupled subsystems, specified as a character vector.

Output Arguments

collapse all

A list of the subsystems decoupled from the model by the Fixed-Point Tool to approximate, returned as a table.

Version History

Introduced in R2019a