MATLAB: Is there a way to output the final simulated time-response from procest()

procestsystem identificationSystem Identification Toolboxtime delay

I am using procest() to estimate values in a transfer function based on experimental input/output data. The transfer function contains a time delay of around 0.2 seconds.
After procest() is finished, I use compare() to look at the experimental time response vs. the simulated response of the newly-estimated transfer function. The problem: procest() gives a FitPercent around 95% for the model, but compare() gives a terrible FitPercent (-13%). This seems to be because the system doesn't respond at all for 0.2 seconds, and the signal develops an offset by that time. I assume that the procest() function simulates the time response differently — maybe it does some calculation of initial conditions, and does not assume that there was no input to the system before the time vectors you give it. Since the resulting model is not a state-space model, I cannot specify InitialCondition to the compare() or lsim() functions …
Basically, I want to access the simulated time response from procest() that gives the 95% fit. Or some other method of generating this signal. Thank you for your time,
-James

Best Answer

Ah, I see it now: it is the InputOffset that you estimated or supplied during process model estimation but perhaps did not specify for the compare plot. Use compareOptions to specify InputOffset for compare plot:
opt = compareOptions('InputOffset', sys.Report.Parameters.InputOffset);
compare(data, sys, opt)