This is the simple code to find transfer function between
sigin signals and then are the filter coefficients estimated by
%% 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 this dropbox link.
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.