Simulink Control Design™ - MathWorks

(Tuis.) #1
Create a linearization option set, enabling the StoreAdvisor option.

opt = linearizeOptions('StoreAdvisor',true);

Linearize the model using this option set, returning the info argument.

io = getlinio(mdl);
[linsys,~,info] = linearize(mdl,io,opt);

Extract the LinearizationAdvisor object from info.

advisor = info.Advisor

advisor =
LinearizationAdvisor with properties:

Model: 'scdpendulum'
OperatingPoint: [1x1 opcond.OperatingPoint]
BlockDiagnostics: [1x11 linearize.advisor.BlockDiagnostic]
QueryType: 'All Blocks'

Create LinearizationAdvisor Using slLinearizer Interface

Load Simulink model.

mdl = 'scdspeed';
load_system(mdl)

Create a linearization option set, enabling the StoreAdvisor option.

opt = linearizeOptions('StoreAdvisor',true);

Define input and output analysis points, and create an slLinearizer interface using
this option set.

io(1) = linio('scdspeed/throttle (degrees)',1,'input');
io(2) = linio('scdspeed/rad//s to rpm',1,'output');
SL = slLinearizer(mdl,io,opt);

Find the transfer function from the input to the output, returning the info argument.

[linsys,info] = getIOTransfer(SL,'scdspeed/throttle (degrees)','scdspeed/rad//s to rpm');

17 Objects — Alphabetical List

Free download pdf