Generating time domain data objects

When the data are available as workspace variables or ASCII files or variables in MAT-files, the "Compose" command in the "Read Time Domain Data" block allows to easily assemble them. The fields of the Compose window can be filled in with valid MATLAB commands, like variables, subscripted variables like data(:,2), or special file references (use "Browse" at the appropriate places). When assembling the objects, the function checks the data if they are consistent indeed, and give warnings if they are not.

A special call allows the independent use of the Compose window:

     fdtool('callback','compinp','init1') %compose time domain objects

In time domain, automatic determination of the period length, the excitation frequencies, and the Fourier coefficients is provided. However, if you can set the first two or at least the second one properly, this can improve speed and calculation accuracy. So, if you can, do not forget to fill in the "Frequencies" and/or the "PeriodLength" property, e.g.

     data.frequencies = 1/0.03*[1:2:15];
     data.periodlength = 0.03;
If the data of more than one experiments are used, and measurements are properly synchronized, set also the property "synchronization", e.g.
     data.synchronization=’on’;
otherwise unnecessarily long processing time may be wasted later, during the execution of the "Variance Analysis" block.

Sample programs for preparing load

Simple example

Let us assume first that we have measured 4096 time domain samples, which are stored in the vectors inp and outp. The sampling frequency is fs = 40960 Hz, the period length in each signal is Tp = 1/80 s (there are 8 periods). The frequency content is fv = [1:2:15]/Tp.
%Make the object:
obj = tiddata(outp,inp,1/40960);
%Set some properties:
obj.periodlength = 1/80;
obj.frequencies = [1:2:15]/80;
get(obj) %check properties
Now the variable obj can be imported to the block "Read Time Domain Data".

Multiple experiments

As a more complex example (multiple experiments), let us assume that we have measured five times 1024 time domain samples, which are stored in the 1024 x 5 arrays inp and outp. The sampling frequency is fs = 40960 Hz, the period length in each signal is 1/160 s (there are 4 periods in each record).
%First prepare the data in 1 x 5 cell arrays:
u = num2cell(inp,1); y = num2cell(outp,1);
%Now make the object:
obj = tiddata(y,u,1/40960);
%Set some properties:
obj.periodlength = 1/160;
obj.synchronization=’on’;
get(obj) %check properties
Now the variable obj can be imported to the block "Read Time Domain Data".

*****************************

Back to the fdident FAQ page     Back to the Developers' Page