Documentation

advise

Find blocks that are potentially problematic for linearization

When you linearize a Simulink® model, you can create a LinearizationAdvisor object that contains diagnostic information about individual block linearizations. To search the LinearizationAdvisor object for diagnostics of blocks that are potentially problematic for linearization, use the advise function.

Syntax

advise(advisor)
result = advise(advisor)

Description

example

advise(advisor) opens the Linear Analysis Tool with an Advisor tab open for troubleshooting the block linearizations in advisor. For more information, see Troubleshoot Linearization Results in Linear Analysis Tool.

example

result = advise(advisor) returns a LinearizationAdvisor object that contains linearization diagnostic information for any blocks in advisor that are potentially problematic for linearization.

Examples

collapse all

Load Simulink model.

mdl = 'scdpendulum';
load_system(mdl)

Linearize model and obtain LinearizationAdvisor object.

io = getlinio(mdl);
opt = linearizeOptions('StoreAdvisor',true);
[linsys,~,info] = linearize(mdl,io,opt);
advisor = info.Advisor;

Open the Linearization Advisor in the Linear Analysis Tool.

advise(advisor)

Load Simulink model.

mdl = 'scdpendulum';
load_system(mdl)

Linearize model and obtain LinearizationAdvisor object.

io = getlinio(mdl);
opt = linearizeOptions('StoreAdvisor',true);
[linsys,~,info] = linearize(mdl,io,opt);
advisor = info.Advisor;

Find potentially problematic blocks for linearization.

result = advise(advisor)
result = 
  LinearizationAdvisor with properties:

               Model: 'scdpendulum'
      OperatingPoint: [1x1 opcond.OperatingPoint]
    BlockDiagnostics: [1x3 linearize.advisor.BlockDiagnostic]
           QueryType: 'Linearization Advice'

Input Arguments

collapse all

Diagnostic information for block linearizations, specified as a LinearizationAdvisor object or an array of LinearizationAdvisor objects.

Output Arguments

collapse all

Diagnostic information for potentially problematic blocks in linearization results, returned as a LinearizationAdvisor object. result contains linearization diagnostic information for any blocks in advisor that are on the linearization path and satisfy at least one of the following criteria:

  • Have diagnostic messages regarding the block linearization

  • Linearize to zero

  • Have substituted linearizations

Algorithms

Calling the advise function is equivalent to performing the following custom query with the find function:

qPath     = linqueryIsOnPath;
qZero     = linqueryIsZero;
qBlkRep   = linqueryIsBlockSubstituted;
qDiags    = linqueryHasDiagnostics;
  
q = qPath & (qZero | qDiags | qBlkRep);
 
advisor_new = find(advisor,q);

Introduced in R2017b

Was this topic helpful?