www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/SpecifySubstituteBlockLinearizationAndLinearizeModelExample.m
%% Specify Substitute Block Linearization and Linearize Model %% % Open the Simulink model. sys = 'scdpwm'; open_system(sys) %% % Extract linearization input and output from the model. io = getlinio(sys); %% % Linearize the model at the model operating point. linsys = linearize(sys,io) %% % The discontinuities in the Voltage to PWM block cause the model to % linearize to zero. To treat this block as a unit gain during % linearization, specify a substitute linearization for this block. blocksub.Name = 'scdpwm/Voltage to PWM'; blocksub.Value = 1; %% % Linearize the model using the specified block substitution. linsys = linearize(sys,blocksub,io)