MATLAB: Does the ‘Buffer’ block behave differently between Signal Processing Blockset 6.2 (R14SP3) and later versions when inside an Enabled subsystem

When I have a 'Buffer' block inside an enabled subsystem, it used to output whatever samples it had inside at the appropriate time, but now it does not output a frame until all the values are filled.

Best Answer

In the attached model (buffer_model.mdl), two buffers are compared:
1. 'buffer1' is outside enabled subsystem
2. 'buffer2' is inside enabhled subsystem
When we run the model, 'buffer1' gives an initial frame of Initial Conditions (ICs) and then proceed to give a buffered frame of data. Notice that:
1. 'buffer1' only outputs a full frame of input data (never a partial frame).
2. 'buffer1' only outputs the input data when it has buffered a full frame of input.
Inside the enabled subsystem, 'buffer2' is asked to output at t=20s. However, it has only accumulated 10 inputs at t=20s. 'buffer2' is in an underrun condition. If the enabled signal is conditioned such that 'buffer2' is run out of all its input data, 'buffer2' will give incorrect results. So, we added underrun protection in R2006a.
In the 'buffer' mode used in your model, the underrun protection works as follows: The 'buffer' outputs a fresh frame of input data only when it has accumulated enough inputs. Otherwise, it will output the previous frame (in the case, the ICs). This 'buffer2' behavior is thus consistent with 'buffer1' (outside enabled subsystem).