Fourier transform interpolation windowing

Your Name]In summary, the conversation discusses the use of Fourier interpolation to turn a signal with 256 points into a signal with 1024 points. To minimize Gibbs ringing, a soft window such as a raised cosine is suggested. The conversation also addresses potential errors in the implementation of the interpolation, including typos in the code and using a window function that is longer than the original signal. The expert recommends double checking the code and comparing the original signal, windowed signal, and interpolated signal to identify any discrepancies.
  • #1
tjackson3
150
0

Homework Statement



Suppose we have a signal given by

[tex]\[f(t) = rect\left(\frac{t}{64} - 1\right) + 3*rect\left(\frac{t-96}{64} - 1\right)\][/tex]

or in piecewise notation,

[tex]f(t) = \left\{
\begin{array}{c l}
0 & 0 \leq t < 32,\\
1 & 32 \leq t < 96 \\
0 & 96 \leq t < 128 \\
3 & 128 \leq t < 192 \\
0 & 192 \leq t < 256
\end{array}
\right.[/tex]

This signal is 256 pixels long (I don't know why my professor used pixels as a unit here). Use Fourier interpolation to turn this signal into a signal with 1024 points. There will be Gibbs ringing. Use a soft window, such as a raised cosine, to try to cut down on the Gibbs ringing. There's more to the problem than this, but I feel like if I can get this part down, I can figure the rest out. Also, this is done in MATLAB.

Homework Equations



MATLAB has a function that allows you to directly perform the Fourier interpolation: interpft(x,n), where x is the signal to be interpolated, and n is the number of points you want to wind up with. The Fourier transform of a function x(t) is given by

[tex] F(\omega) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} x(t)e^{-i\omega t}\ dt[/tex]

An example of a raised cosine is

[tex] \frac{1}{2}\left[1 + \cos x\right] [/tex]

The Attempt at a Solution



The idea is that instead of using a rectangular window, we want to use a softer one. Despite what the problem statement says, according to some work we did in class, it's implied that the window is a combination of a raised cosine with a rectangular window; i.e., it's a rectangular window, but rather than the sharp dropoffs that come at the point of discontinuity, you use a raised cosine with some period to have a gentle slope down to zero.

This has completely baffled me. I've used several different raised cosine windows in MATLAB, but I never get anything close to an interpolated version of the original signal back. I think it may be a conceptual issue. Essentially, I've tried taking the fft of the original signal, multiplying it by the new window in frequency space, and ifft'ing it back to see if I get anything like the original signal, but I never do. An example of the window I've tried to use is here:

win1 = [zeros(1,50),3*(cos([-206:-1]/206*pi)+1)/2,3*ones(1,512),3*(cos([1:206]/206*pi)+1)/2,zeros(1,50)];

One thought I've had about my errors is that there's something fundamentally wrong with the way I'm doing the fft. Here's a picture of the original signal:

http://tjackson3.webs.com/fs1.jpg

And here's a picture of the absolute value of the fft of the signal:

http://tjackson3.webs.com/fs2.jpg

When I multiply the original signal by the window in frequency space (since multiplication in frequency space is the same as convolution in time space) and take the ifft of it, this is what I get:

http://tjackson3.webs.com/fs3.jpg

which looks somewhat odd. To wit, it looks like something in the frequency domain, but it isn't (and taking another ifft of it confirms this).

So I suppose my main questions are:

a.) Am I missing something in how Fourier interpolation works? I think that you take the fft of your signal, multiply it by the window, ifft it with more points (though to be honest, I can't figure out how that works), and there you have it, but obviously that can't be right.

b.) Where do I go from here? I want to try to get something resembling the original signal back, but I can't seem to come close.

Thanks so so much for your help, and happy Thanksgiving!

Trace Jackson
 
Last edited by a moderator:
Physics news on Phys.org
  • #2


Dear Trace,

Thank you for sharing your progress and questions regarding Fourier interpolation. It seems like you have a good understanding of the concept and the steps involved, but there may be some small errors in your implementation.

First, I would recommend checking your code for any typos or mistakes in the window function. It's always a good idea to double check your code to make sure it matches the mathematical equations you are using.

Second, it looks like you are using a window function that is 1024 points long, but your original signal is only 256 points long. This could be causing some issues with the interpolation. I would suggest using a window function that is the same length as your original signal (256 points in this case).

Third, when taking the inverse FFT, make sure to use the same number of points as your original signal (256 points). This will ensure that you get a signal back that is the same length as your original.

Finally, I would suggest plotting the original signal, the windowed signal, and the interpolated signal to compare and see where the differences may be coming from. This can help you pinpoint any mistakes in your code or understanding.

I hope this helps and good luck with your project! Happy Thanksgiving to you as well.


 

Related to Fourier transform interpolation windowing

1. What is a Fourier transform?

A Fourier transform is a mathematical tool that allows us to decompose a signal into its individual frequency components. It converts a signal from the time domain to the frequency domain, where we can analyze its frequency content.

2. What is interpolation in the context of Fourier transform?

In the context of Fourier transform, interpolation refers to the process of estimating or filling in missing data points in a signal. It is often used to improve the resolution of a signal in the frequency domain.

3. What is windowing in Fourier transform?

Windowing is a technique used to reduce the effects of spectral leakage in a Fourier transform. It involves multiplying a signal by a window function, which tapers the edges of the signal and reduces the contribution of high-frequency components near the edges.

4. How does Fourier transform interpolation improve signal resolution?

Fourier transform interpolation improves signal resolution by filling in the gaps between data points, resulting in a smoother and more accurate representation of the signal in the frequency domain. This allows for a more precise analysis of the signal's frequency content.

5. What are some common window functions used in Fourier transform interpolation?

Some common window functions used in Fourier transform interpolation include the Hann, Hamming, and Blackman windows. These windows have different properties and are chosen based on the specific requirements of the signal being analyzed.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
846
  • Calculus and Beyond Homework Help
Replies
3
Views
398
  • Calculus and Beyond Homework Help
Replies
3
Views
977
Replies
0
Views
489
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
4K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
957
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Back
Top