Query object for finding blocks with at least one input/output pair that linearizes to zero
linqueryHasZeroIOPair creates a custom query object for
finding all the blocks in a linearization result that have at least one input/output
pair that linearizes to zero. For a zero input/output pair, a change in the input value
has no effect on the output value.
When you linearize a Simulink® model, you can create a
LinearizationAdvisor object that contains diagnostic information about individual
block linearizations. To find block linearizations that satisfy specific criteria, you can use
with custom query objects. Alternatively, you can analyze linearization diagnostics using the
Linearization Advisor in the Model Linearizer. For more information on finding
specific blocks in linearization results, see Find Blocks in Linearization Results Matching Specific Criteria.
creates a query object for finding all the blocks in a
query = linqueryHasZeroIOPair
LinearizationAdvisor object that have at least one
input/output path that linearizes to zero.
QueryType — Query type
'Has Zero I/O Pair' (default) | character vector
Query type, specified as
'Has Zero I/O Pair'.
Description — Query description
'Blocks with a Zero IO Pair' (default) | character vector
Query description, specified as
'Blocks with a Zero IO
Pair'. You can add your own description to the query object
using this property.
After creating a
linqueryHasZeroIOPair query object, you can:
CompoundQueryobject by logically combining the
linqueryHasZeroIOPairquery with other query objects.
|Find blocks in linearization results that match specific criteria|
Find Blocks with Zero Input/Output Paths
Load the Simulink model.
mdl = 'scdspeed'; load_system(mdl)
Linearize the model and obtain the
opts = linearizeOptions('StoreAdvisor',true); io(1) = linio('scdspeed/throttle (degrees)',1,'input'); io(2) = linio('scdspeed/rad//s to rpm',1,'output'); [sys,op,info] = linearize(mdl,io,opts); advisor = info.Advisor;
Create query object, and find all blocks with at least one input/output path that linearizes to zero.
qZeroPair = linqueryHasZeroIOPair; advZeroPair = find(advisor,qZeroPair)
advZeroPair = LinearizationAdvisor with properties: Model: 'scdspeed' OperatingPoint: [1x1 opcond.OperatingPoint] BlockDiagnostics: [1x6 linearize.advisor.BlockDiagnostic] QueryType: 'Has Zero I/O Pair'
You can also create custom queries for finding specific blocks in linearization results using the Linearization Advisor in the Model Linearizer. For more information, see Find Blocks in Linearization Results Matching Specific Criteria.
Introduced in R2017b