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.

有帮助吗?

解决方案

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.']);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top