MATLAB: Do I receive an error when trying to estimate the parameters of an idgrey model with frequency domain data in the System Identification Toolbox 6.0.1 (R14)

domainfrequencyiddataidentidgreypemsampleSystem Identification Toolboxtime

I am constructing a model for parameter estimation in the System Identification Toolbox 6.0.1 (R14). This model is constructed from experimental frequency domain data and I am utilizing the IDGREY function to place constraints on my model. The data is constructed as follows:
dat = iddata( [Out1' Out2' Out3'] ,[Inp1' Inp2'], ...
[0.0008],'Domain','Frequency','Freq',freq,'Units','rad/s')
After creating the IDGREY model I attempt to estimate the parameters using the PEM function and I receive the following error:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> pe_f at 167
farg{kexp} = exp(i*freq{kexp}*Tsdata{kexp}*picorr);
Error in ==> pe at 125
[el,xic,rmzflag] = pe_f(m,data,init,residcall);
Error in ==> idgrey.pem at 217
[e,xi] = pe(data,m0);

Best Answer

This has been verified as a bug in the System Identification Toolbox 6.0.1 in the way that sample times are assigned to IDDATA objects when using frequency domain data. Although the sample time is issued in the call to IDDATA, the resulting data set does not retain this sample time. The following is observed regarding this data set:
dat.Ts
ans =
[]
Currently, to work around this issue, you can specify this sample time directly to the data structure as follows:
dat.Ts = 0.0008