Simulink Control Design™ - MathWorks

(Tuis.) #1

Specify the linearization of the delay block scdspeed_compdelay/Computational
Delay with a continuous transport delay.


Use these commands to specify the block linearization:


delayblk = 'scdspeed_compdelay/Computational Delay';
set_param(delayblk,'SCDEnableBlockLinearizationSpecification','on');
rep = struct('Specification','ss(1,''InputDelay'',Ts)',...
'Type','Expression',...
'ParameterNames','',...
'ParameterValues','');
set_param(delayblk,'SCDBlockLinearizationSpecification',rep);


The analysis of the controller design then remains in the continuous domain. Now,
linearize the model with delays of Ts = 0.1 and 0.25. First, set the linearization I/O points:


io(1) = linio('scdspeed_compdelay/PID Controller',1,'input');
io(2) = linio('scdspeed_compdelay/Zero-Order Hold',1,'openoutput');


Linearize the model at Ts = 0.1:


Ts = 0.1;
sys2 = linearize(mdl,io);


Linearize the model at Ts = 0.25:


Ts = 0.25;
sys3 = linearize(mdl,io);


Finally, linearize the model without the effects of sampling and the computational delay:


io(1) = linio('scdspeed_contcomp/PID Controller',1,'input');
io(2) = linio('scdspeed_contcomp/rad//s to rpm',1,'openoutput');
sys1 = linearize(mdl_continuous,io);


You can use the linear models of the engine to examine the effects of the computational
delay on the frequency response. In this case, the phase response of the system is
significantly reduced due to the delay introduced by sampling.


p = bodeoptions('cstprefs');
p.Grid = 'on';
p.PhaseMatching = 'on';


Modeling Computational Delay and Sampling Effects
Free download pdf