Determine if model has internal delays


  • B = hasInternalDelay(sys) example
  • B = hasInternalDelay(sys,'elem')



B = hasInternalDelay(sys) returns 1 (true) if the model sys has internal delays, and 0 (false) otherwise. If sys is a model array, then B is true if least one model in sys has delays.

B = hasInternalDelay(sys,'elem') checks each model in the model array sys and returns a logical array of the same size as sys. The logical array indicates which models in sys have internal delays.


expand all

Check model for internal delays

Build a dynamic system model of the following closed-loop system and check the model for internal delays.

s = tf('s');
G = exp(-2.4*s)/(s-5);
C = pid(5,0.1);
sys = feedback(G*C,1);
B = hasInternalDelay(sys)
B =


The model sys has an internal delay because of the transfer delay in the plant G. Therefore, hasInternalDelay returns 1.

Input Arguments

expand all

sys — Model or array to checkdynamic system model | model array

Model or array to check for internal delays, specified as a dynamic system model or array of dynamic system models.

Output Arguments

expand all

B — Flag indicating presence of internal delayslogical | logical array

Flag indicating presence of internal delays in input model or array, returned as a logical value or logical array.

Was this topic helpful?