- #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: