DelayBlock = 'scdspeed/Induction to Power Stroke Delay/dM//dt delay';
To compute a linearization using a first order approximation, use one of the following
techniques to set the order of the Pade approximation to 1:
- In the Variable Transport Delay block dialog box, enter 1 in the Pade Order (for
linearization) field. - At the command line, enter the following command:
set_param(DelayBlock,'PadeOrder','1');
Next, specify the linearization I/O to throttle angle as the input and engine speed as the
output by running:
io(1) = linio('scdspeed/throttle (degrees)',1,'input');
io(2) = linio('scdspeed/rad//s to rpm',1,'output');
Compute the linearization using the following linearize command:
sys_1st_order_approx = linearize(model,io);
You can compute a linearization using a second order approximation by setting the Pade
order to 2:
set_param(DelayBlock,'PadeOrder','2');
sys_2nd_order_approx = linearize(model,io);
To compute a linear model with the exact delay representation, set the
'UseExactDelayModel' property in the linoptions object to on:
opt = linearizeOptions;
opt.UseExactDelayModel = 'on';
Linearize the model using the following linearize command:
sys_exact = linearize(model,io,opt);
Compare the Bode response of the Pade approximation model and the exact linearization
model by running:
p = bodeoptions('cstprefs');
p.Grid = 'on';
p.PhaseMatching = 'on';
p.XLimMode = {'Manual'};