Simulink Control Design™ - MathWorks

(Tuis.) #1

When troubleshooting linearization issues using the Linearization Advisor, diagnostic
information for Simscape states and inputs is now combined into a single block diagnostic
object. Previously, states and inputs were returned in separate diagnostic objects.


Update Code


To view diagnostic information for Simscape networks at the command line, you first
query the Linearization Advisor object, advisor, for blocks of type 'simscape'.


qSS = linqueryIsBlockType('simscape');
advSS = find(advisor,qSS);


In R2017b, to view state or input information for the Simscape network, you searched the
block paths of the diagnostics in advSS for the text EVAL_KEY/STATE or EVAL_KEY/
INPUT, respectively. For example, to find diagnostics with state information, you used:


paths = getBlockPaths(advisor);
index = contains(paths,'EVAL_KEY/STATE');
diag = getBlockInfo(advSS,index);


You then viewed the state or input information in the associated operating point object.


diag(i).OperatingPoint


Starting in R2018a, you access both the state and input information directly from the
operating point of the Simscape block diagnostic object without searching the block
paths.


advSS.BlockDiagnostics(i).OperatingPoint


See Also


Objects
BlockOperatingPoint | LinearizationAdvisor


Functions
getBlockInfo | getBlockPaths | highlight


Topics
“Troubleshoot Linearization Results at Command Line” on page 4-42


BlockDiagnostic
Free download pdf