I understand that normally I'd use ftest()
after prepping my data with iddata()
. However, for iddata()
to work correctly I need to have both my input and output data be sampled at the same rate. Is there a rate-independent variant of iddata()
or any other way which will allow me to accomplish what I need to accomplish?
Asked
Active
Viewed 1,019 times
1

Sanuuu
- 243
- 1
- 10
-
You can work with nonuniformly sampled data only at the command line by specifying a vector of time instants using the `SamplingInstants` property of `iddata`, as described in Constructing an `iddata` Object for Time-Domain Data. – NKN Aug 04 '14 at 17:00
1 Answers
0
I am working on the same problem (https://dsp.stackexchange.com/questions/19458/how-to-compute-transfer-function-from-experimental-data) and I am not sure I found the way to do it, but I share my idea with you, so we might find a solution that works for both of us (if you already have found a way to do it, please share it).
Method 1
If you have your signals in the time domain you can synchronize them and then use the tfestimate
function.
% Define timeseries
ts_output = timeseries(x,time1,'Name','output');
ts_input = timeseries(y,time2,'Name','input');
% Synchronization
[ts_output,ts_input] = synchronize(ts_output,ts_input,'uniform',...
'interval',delta_t);
% Compute transfer function
Fs = 1/delta_t;
[Txy,W] = tfestimate(ts_input.data,ts_output.data,[],[],[],Fs);
Method 2
Instead of synchronize you could resample the signal sampled at lower frequency: assume Fs1 > Fs2
[P,Q] = rat(Fs1/Fs2);
y2 = resample(y2,P,Q);

Rhei
- 127
- 11