DSPRelated.com
Forums

Numerically Computing Impulse Response from Power Frequency Response

Started by sush...@yahoo.com March 30, 2007
I am trying to compute the impulse response of a given channel to
include in a BER analysis.  I have the power transfer function of the
channel, not the classical amplitude/phase transfer function of the
channel.  Fortunately, the transfer function is symmetric, so I can
numerically calculate the impulse response as:

amp_freq_resp = sqrt(power_freq_resp);
imp_resp = ifft(amp_freq_resp);
imp_resp = real(imp_resp);

The final command simply removes the imaginary portion of the impulse
response, as it is only an effect of the IFFT calculation in MATLAB.
The square root can be used because the transfer function, so the
impulse response will be purely real.

This is where the problem arises.  The power transfer function is near
Gaussian, and so is the amplitude transfer function.  This would imply
that the impulse response should be near Gaussian.  However, because I
am taking a finite length IFFT, the impulse response is a Gaussian
convolved with a very high frequency sinc function.  So I get a
Gaussian envelope with alternating positive and negative values in my
impulse response.  Of course, this sort of impuse response is terrible
for certain modulation types.

My question is, can I simply calculate the envelope of the impulse
response and use that as the impulse response in my BER analysis?  If
not, is there any method that I can use to easily remove the effects
of the finite-length IFFT from the impulse response?

Thanks,
Susheem

susheemg@yahoo.com wrote:
> I am trying to compute the impulse response of a given channel to > include in a BER analysis. I have the power transfer function of the > channel, not the classical amplitude/phase transfer function of the > channel. Fortunately, the transfer function is symmetric, so I can > numerically calculate the impulse response as: > > amp_freq_resp = sqrt(power_freq_resp); > imp_resp = ifft(amp_freq_resp); > imp_resp = real(imp_resp); > > The final command simply removes the imaginary portion of the impulse > response, as it is only an effect of the IFFT calculation in MATLAB. > The square root can be used because the transfer function, so the > impulse response will be purely real. > > This is where the problem arises. The power transfer function is near > Gaussian, and so is the amplitude transfer function. This would imply > that the impulse response should be near Gaussian. However, because I > am taking a finite length IFFT, the impulse response is a Gaussian > convolved with a very high frequency sinc function. So I get a > Gaussian envelope with alternating positive and negative values in my > impulse response. Of course, this sort of impuse response is terrible > for certain modulation types. > > My question is, can I simply calculate the envelope of the impulse > response and use that as the impulse response in my BER analysis? If > not, is there any method that I can use to easily remove the effects > of the finite-length IFFT from the impulse response? >
It sounds like you are putting your amplitudes into the wrong bins. If MatLab still works the way I remember, S(1) is the DC amplitude, S(2) and S(N) are the +/- (sampling rate)/N bins, etc. If you are centering your power_freq_resp around S(N/2) instead of S(1) then you are telling the IFFT that you have a spectrum that's centered around 1/2 the sampling rate, which will result in an ifft that alternates. Try recentering your power_freq_resp. If it's truly symmetrical around S(1) then the imaginary component of the ifft will be close to N * roundoff, so you can use that as a diagnostic of your shifting and measurement process. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
On Mar 30, 10:57 am, "sushe...@yahoo.com" <sushe...@gmail.com> wrote:
> I am trying to compute the impulse response of a given channel to > include in a BER analysis. I have the power transfer function of the > channel, not the classical amplitude/phase transfer function of the > channel. Fortunately, the transfer function is symmetric, so I can > numerically calculate the impulse response as: > > amp_freq_resp = sqrt(power_freq_resp); > imp_resp = ifft(amp_freq_resp); > imp_resp = real(imp_resp);
Is the above actually correct? If you don't have phase information, then in general you can't get the impulse response from the power spectral density alone. I don't see how the symmetry helps in this case. Can you explain, please? Julius
On Mar 30, 12:12 pm, Tim Wescott <t...@seemywebsite.com> wrote:
> sushe...@yahoo.com wrote: > > I am trying to compute the impulse response of a given channel to > > include in a BER analysis. I have the power transfer function of the > > channel, not the classical amplitude/phase transfer function of the > > channel. Fortunately, the transfer function is symmetric, so I can > > numerically calculate the impulse response as: > > > amp_freq_resp = sqrt(power_freq_resp); > > imp_resp = ifft(amp_freq_resp); > > imp_resp = real(imp_resp); > > > The final command simply removes the imaginary portion of the impulse > > response, as it is only an effect of the IFFT calculation in MATLAB. > > The square root can be used because the transfer function, so the > > impulse response will be purely real. > > > This is where the problem arises. The power transfer function is near > > Gaussian, and so is the amplitude transfer function. This would imply > > that the impulse response should be near Gaussian. However, because I > > am taking a finite length IFFT, the impulse response is a Gaussian > > convolved with a very high frequency sinc function. So I get a > > Gaussian envelope with alternating positive and negative values in my > > impulse response. Of course, this sort of impuse response is terrible > > for certain modulation types. > > > My question is, can I simply calculate the envelope of the impulse > > response and use that as the impulse response in my BER analysis? If > > not, is there any method that I can use to easily remove the effects > > of the finite-length IFFT from the impulse response? > > It sounds like you are putting your amplitudes into the wrong bins. If > MatLab still works the way I remember, S(1) is the DC amplitude, S(2) > and S(N) are the +/- (sampling rate)/N bins, etc. > > If you are centering your power_freq_resp around S(N/2) instead of S(1) > then you are telling the IFFT that you have a spectrum that's centered > around 1/2 the sampling rate, which will result in an ifft that alternates. > > Try recentering your power_freq_resp. If it's truly symmetrical around > S(1) then the imaginary component of the ifft will be close to N * > roundoff, so you can use that as a diagnostic of your shifting and > measurement process. > > -- > > Tim Wescott > Wescott Design Serviceshttp://www.wescottdesign.com > > Posting from Google? Seehttp://cfaj.freeshell.org/google/ > > Do you need to implement control loops in software? > "Applied Control Theory for Embedded Systems" gives you just what it says. > See details athttp://www.wescottdesign.com/actfes/actfes.html
Tim, Thanks so much. You caught the error that I was making in computing the IFFT. Susheem
On Mar 30, 12:25 pm, "julius" <juli...@gmail.com> wrote:
> On Mar 30, 10:57 am, "sushe...@yahoo.com" <sushe...@gmail.com> wrote: > > > I am trying to compute the impulse response of a given channel to > > include in a BER analysis. I have the power transfer function of the > > channel, not the classical amplitude/phase transfer function of the > > channel. Fortunately, the transfer function is symmetric, so I can > > numerically calculate the impulse response as: > > > amp_freq_resp = sqrt(power_freq_resp); > > imp_resp = ifft(amp_freq_resp); > > imp_resp = real(imp_resp); > > Is the above actually correct? If you don't have > phase information, then in general you can't get the > impulse response from the power spectral density > alone. I don't see how the symmetry helps in this > case. Can you explain, please? > > Julius
Julius, You are correct in your statement. The transfer function is purely real, so there is no phase information required. Susheem
On Mar 30, 12:25 pm, "sushe...@yahoo.com" <sushe...@gmail.com> wrote:

> > Julius, > > You are correct in your statement. The transfer function is purely > real, so there is no phase information required. > > Susheem
That is true if and only if it's linear phase and that there is no zero crossing in either domain, I believe. Julius