# How to use IFFT to get the system impulse response?

Started by January 11, 2008
```Hello all,
I have got the system transfer function of a two port network in frequency
domain,the frequency range is from 2Ghz to 12GHz.IFFT is used to get the
time domain impulse response,but the result is complex ,not real.The
impulse response of a system should be real.So,please give me some
suggestions.thanks .

```
```On Jan 11, 7:26&#2013266080;am, "antenna404" <wanfa...@163.com> wrote:

> I have got the system transfer function of a two port network in frequency
> domain,

Do you mean that you have samples of the frequency response, either as
real/imag or mag/phase pairs?

> the frequency range is from 2Ghz to 12GHz.IFFT is used to get the
> time domain impulse response,

IFFT requires evenly-spaced frequency samples from 0 Hz to half the
sampling frequency.  How are you filling-in the missing measurements
between 0 Hz and 2 GHz, and between 12GHz and Fs/2 (half the sampling
frequency)?  What are you assuming Fs to be?

> but the result is complex ,not real.The
> impulse response of a system should be real.So,please give me some
> suggestions.thanks .

For a real impulse response, the frequency domain data must be
this requirement?

Or are you doing some sort of baseband processing?

Greg
```
```> but the result is complex ,not real.The
> impulse response of a system should be real.

You can get a real sequence (after doing IFFT) only when the magnitude
of frequency response is symmetric and phase response anti-symmetric.
So make sure your data is in line with this.

Kumar Vijay Mishra.
```
```You need to modify your frequency response to include "negative
frequencies" before taking the IFFT. Here is how its done:

http://www.dspguide.com/ch12/1.htm
```
```>> but the result is complex ,not real.The
>> impulse response of a system should be real.
>
>You can get a real sequence (after doing IFFT) only when the magnitude
>of frequency response is symmetric and phase response anti-symmetric.
>So make sure your data is in line with this.
>
>Kumar Vijay Mishra.
>
hi Kumar Vijay Mishra
I am sure that I have made my data Hermitian symmetric.
just like this:
1-j*1,2-j*2,3-j*3,0,3+j*3,2+j*2,1+j*1.
but after doing IFFT,the output is still a complex sequence.
```
```>On Jan 11, 7:26=A0am, "antenna404" <wanfa...@163.com> wrote:
>
>> I have got the system transfer function of a two port network in
frequency=
>
>> domain,
>
>Do you mean that you have samples of the frequency response, either as
>real/imag or mag/phase pairs?
>
>> the frequency range is from 2Ghz to 12GHz.IFFT is used to get the
>> time domain impulse response,
>
>IFFT requires evenly-spaced frequency samples from 0 Hz to half the
>sampling frequency.  How are you filling-in the missing measurements
>between 0 Hz and 2 GHz, and between 12GHz and Fs/2 (half the sampling
>frequency)?  What are you assuming Fs to be?
>
>> but the result is complex ,not real.The
>> impulse response of a system should be real.So,please give me some
>> suggestions.thanks .
>
>For a real impulse response, the frequency domain data must be
>this requirement?
>
>Or are you doing some sort of baseband processing?
>
>Greg
>

hi Greg
In fact,I am dealing with a transmit-receiveing UWB antenna system
operating between 3.1GHz and 10.6GHz.
The frequency response is obtained from a VNA measurement,it appears as
mag/phase pairs.I want to get the impulse response of the system.
I have zero padding the missing measurement betweeen 0Hz and 2GHz.Then
conjugate-transformation is done to form Hermitian symmetric about 0Hz
before IFFT in matlab.No action is taken between 12GHz and Fs/2.The
sampling frequency ,Fs,is 1/0.06GHz.should the missing measurement between
12GHz and Fs/2 be fill in to get the impulse response?
thanks.
Fajia
```
```>You need to modify your frequency response to include "negative
>frequencies" before taking the IFFT. Here is how its done:
>
>http://www.dspguide.com/ch12/1.htm
>

Thanks a lot,Steven W. Smith.The book is very helpful!

Fajia
```
```On Sun, 13 Jan 2008 05:35:01 -0600, "antenna404" <wanfajia@163.com> wrote:

> In fact,I am dealing with a transmit-receiveing UWB antenna system
>operating between 3.1GHz and 10.6GHz.
> The frequency response is obtained from a VNA measurement,it appears as
>mag/phase pairs.I want to get the impulse response of the system.

Wow.  Deja vu all over again.  That's exactly the problem I faced in my
thesis research.  In 1985.

> I have zero padding the missing measurement betweeen 0Hz and 2GHz.

That results in a convolution of your derived time domain waveform with a
sinc function.  That method really doesn't work well, even with
non-rectangular windows.

>Then
>conjugate-transformation is done to form Hermitian symmetric about 0Hz
>before IFFT in matlab.

I'm not certain whether Matlab needs [-Fs/2 ... Fs/2) or [0 ... Fs) data.
However, even if you got that wrong it still wouldn't explain the imaginary
parts in your IFFT outputs.  It would just modulate by exp(jPI) (alternate
multiplying the time waveform by +1, -1.

Are the imaginary parts in the IFFT waveform of roughly the same amplitude as
the real parts, or are they like "1.000432e-015" (which you should interpret
as zero)?

>No action is taken between 12GHz and Fs/2.The
>sampling frequency ,Fs,is 1/0.06GHz.

I'm hoping that "1/0.06GHz" is greater than 2*12GHz.

>should the missing measurement between
>12GHz and Fs/2 be fill in to get the impulse response?

Again, though this does not explain your complex time domain results, I found
it better to have as much of the spectrum as possible.

Oh ... how did I solve the problem?  Frequency Domain Least Squares, of
course.  Once I had the discrete transfer function, I could derive the causal
difference equation and use it to compute the impulse response.  Matlab code
for FDLS is available at
"http://apollo.ee.columbia.edu/spm/external/tipsandtricks/files/TandT_Jan2007.zip".
Explanation of the technique is in IEEE Signal Processing Magazine, "Tips and
Tricks" article, Jan 2007 issue.  If you don't have access to that, I can get
a copy to you.

Greg
```
```On Jan 13, 5:52&#2013266080;am, "antenna404" <wanfa...@163.com> wrote:

> &#2013266080;I am sure that I have made my data Hermitian symmetric.
> just like this:
> 1-j*1,2-j*2,3-j*3,0,3+j*3,2+j*2,1+j*1.
> but after doing IFFT,the output is still a complex sequence.

Just as an experiment, try structuring your data set like

"0, 3+j*3, 2+j*2, 1+j*1, 1-j*1, 2-j*2, 3-j*3",

if your FFT size is odd, or

"0, 3+j*3, 2+j*2, 1+j*1, 4, 1-j*1, 2-j*2, 3-j*3",

if it is even, and run that through Matlab's IFFT.

Greg

```
```>On Sun, 13 Jan 2008 05:35:01 -0600, "antenna404" <wanfajia@163.com>
wrote:
>
>> In fact,I am dealing with a transmit-receiveing UWB antenna system
>>operating between 3.1GHz and 10.6GHz.
>> The frequency response is obtained from a VNA measurement,it appears
as
>>mag/phase pairs.I want to get the impulse response of the system.
>
>Wow.  Deja vu all over again.  That's exactly the problem I faced in my
>thesis research.  In 1985.
>
>> I have zero padding the missing measurement betweeen 0Hz and 2GHz.
>
>That results in a convolution of your derived time domain waveform with
a
>sinc function.  That method really doesn't work well, even with
>non-rectangular windows.
>
>>Then
>>conjugate-transformation is done to form Hermitian symmetric about 0Hz
>>before IFFT in matlab.
>
>I'm not certain whether Matlab needs [-Fs/2 ... Fs/2) or [0 ... Fs)
data.
>However, even if you got that wrong it still wouldn't explain the
imaginary
>parts in your IFFT outputs.  It would just modulate by exp(jPI)
(alternate
>multiplying the time waveform by +1, -1.
>
>Are the imaginary parts in the IFFT waveform of roughly the same
amplitude as
>the real parts, or are they like "1.000432e-015" (which you should
interpret
>as zero)?
>
>>No action is taken between 12GHz and Fs/2.The
>>sampling frequency ,Fs,is 1/0.06GHz.
>
>I'm hoping that "1/0.06GHz" is greater than 2*12GHz.
>
>>should the missing measurement between
>>12GHz and Fs/2 be fill in to get the impulse response?
>
>Again, though this does not explain your complex time domain results, I
found
>it better to have as much of the spectrum as possible.
>
>Oh ... how did I solve the problem?  Frequency Domain Least Squares, of
>course.  Once I had the discrete transfer function, I could derive the
causal
>difference equation and use it to compute the impulse response.  Matlab
code
>for FDLS is available at
>"http://apollo.ee.columbia.edu/spm/external/tipsandtricks/files/TandT_Jan2007.zip".
>Explanation of the technique is in IEEE Signal Processing Magazine, "Tips
and
>Tricks" article, Jan 2007 issue.  If you don't have access to that, I can
get
>a copy to you.
>
>Greg
>

Hi,Greg.Thanks a lot for your help.
I am trying to use FDLS.But I know nothing about it yet.Please give one
copy of the magazine article in IEEE Signal Processing Magazine,Jan 2007
issue.It is not available to me on line.
My email:antenna404@163.com
Thanks again.

Fajia Wang
```