Simulink Control Design™ - MathWorks

(Tuis.) #1
This time delay accounts for the duty cycle frequency of the PWM signal which is at 100
Hz. To specify the delay on the subsystem scdpwm/Voltage to PWM right click on the
block and select Linear Analysis->Specify Linearization. The following block dialog in
which you specify the delay dynamics opens.

The following code is equivalent to entering the delay into the specification dialog.

set_param(pwmblk,'SCDEnableBlockLinearizationSpecification','on');
rep = struct('Specification','ss(1,''OutputDelay'',1/100)',...
'Type','Expression',...
'ParameterNames','',...
'ParameterValues','');
set_param(pwmblk,'SCDBlockLinearizationSpecification',rep);

Linearizing the model with the specified subsystem linearization now gives the expected
result.

opt = linearizeOptions('SampleTime',0);
sys = zpk(linearize(mdl,io,opt))

sys =

From input "Step" to output "Plant Model":
1
exp(-0.01*s) * -------------
(s^2 + s + 1)

Continuous-time zero/pole/gain model.

Comparing the Linearization and Simulation

You can compare the linearization of the model to the actual linearization using a
frest.createStep signal. It is important to note that the specification of the

2 Linearization

Free download pdf