Buffer setting on the transport delay block for real-time simulation
Question:
Why the time delay set by a Transport-Delay block becomes inaccurate during realtime?
Answer:
You should check the parameter of the <initial buffer size> in the transport delay block. The buffer size (in number of samples) must be greater than Td/Ts, where Td is the Time delay you want and Ts is the model time-step. The attached picture shows more details.
In off-line simulation, this parameter is not important, because SIMULINK is able to allocates additional memory with an expense of calculation time, and displays a message after the simulation that indicates the total buffer size needed. However, this function cannot be implemented on realtime simulation, due to the constraint on calculation time. Consequently, you must make sure the buffer size is big enough in terms of the time delay. Otherwise, you may find the time delay is smaller than what you want.




