Simulink Control Design™ - MathWorks

(Tuis.) #1
Simulate the resulting closed-loop system with a sample time Ts = 0.25. You examine
these results later in this example.

Ts = 0.25;
sim(mdl);
Td = simout.time;
Yd = simout.signals.values;

Accounting for the Delays and Sampling Continuous Time Domain

As a second approach, redesign the controller with the continuous equivalents of the unit
delay and zero order hold.

Set the zero order hold dynamics

on the block scdspeed_compdelay/Zero-Order Hold by right clicking on the block
and select Linear Analysis->Specify Linearization. The following block dialog opens to
specify the zero-order hold dynamics.

Also, specify the linearization as a zero order hold scdspeed_compdelay/Zero-Order
Hold with continuous representation. The following code is equivalent to entering these
specifications into the specification dialog.

zohblk = 'scdspeed_compdelay/Zero-Order Hold';
set_param(zohblk,'SCDEnableBlockLinearizationSpecification','on');
rep = struct('Specification','(1-ss(1,''InputDelay'',Ts))*ss(0,1,1,0)/Ts',...
'Type','Expression',...
'ParameterNames','',...
'ParameterValues','');
set_param(zohblk,'SCDBlockLinearizationSpecification',rep);

9 Classical Control Design

Free download pdf