1

This is the simple code to find transfer function between "sigout" and "sigin" signals and then are filter coeffs estimated by "invfreqz" function.

%% load simlated data
load CFDvsABAQUS_TC.mat

%% simulated data preprocessing (grid orientation B)
time = TCb(:,1);
sigin = TCb(:,2);           % inlet temperature (TC signal by Abaqus)
sigout = TCb(:,3);          % outlet temperature (by cfd FENIX)
Fs = 1/mean(diff(time));    % sampling frequency

%% Transfer Function Estimate outlet->inlet
[toi,foi]=tfestimate(sigout,sigin,2^13,[],[],Fs);

%% filter design by known transfer function
w = linspace(0,pi,length(fio)); % angular frequency f=[0,fs/2] -> w=[0,pi]
m = 500; % b coeffs
n = 500; % a coeffs
[boi,aoi] = invfreqz(toi,w,n,m);

%% final Digital filtering
esigin = filter(boi,aoi,sigout);

The input data are available at: https://www.dropbox.com/s/hj09ktc67mnzs4d/CFDvsABAQUS_TC.mat?dl=0

The final filter function produce completely wrong results (the result should be similar to original "sigin" signal). I have no idea what is wrong.

Any help will be very useful for me. Thanks in advance.

m7913d
  • 10,244
  • 7
  • 28
  • 56
  • Probably all problems comes from extremely high order m=n=500 at invfreqz function... Some numerical instabilities??? But I need high order estimation to fit properly estimated transfer function. – michalkvasnicka Apr 28 '17 at 15:04
  • It seems strange that you need such a high order. Note that `toi` is really noisy. Fitting noise is meaningless. Secondly, note that a transfer function is only able to extract the linear relation between in and out. – m7913d May 04 '17 at 13:09

0 Answers0