Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
689 views
in Technique[技术] by (71.8m points)

matlab - transfer function in time domain

I have two signals in time domain (X and Y). I am trying to calculate the transfer function between them. I used the function tfestimate, which returns a transfer function as a function of frequency and a vector of frequencies at which tfestimate estimates the transfer function. It only returns for positive frequencies, since my signals are not complex. My issue is how to visualize this transfer function in the time domain. I tried the following code, but the returned function is reversed in time domain. I wonder why.

x = randn(16384,1); % generate random signal
gaussFilter = gausswin(100);
gaussFilter = gaussFilter / sum(gaussFilter); % Normalize.
y = conv(x,gaussFilter);
y = y(1:length(x)); % truancate the Y to be the same length as X
txy = tfestimate(x,y,1024);
tyx = conj(txy(end:-1:2)); % since tfestimate only returns for positive frequency, I estimate the result for negative frequency as the conjugate of positive frequency. 
t = ifft([txy' tyx']); % use inverse fourier to visualize transfer function in time domain.

The result 't' is not the transfer function, but is a version whose time is in reverse. Could someone help me to understand what is going on? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This a very common mistake. Many people seem to believe ' means transpose, but actually it means conjugate transpose. To simply transpose you should use .'

So: change

t = ifft([txy' tyx']);

into

t = ifft([txy.' tyx.']);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...