Calculating the Fourier Transform of a Digital Signal

Click For Summary
The discussion focuses on calculating the Fourier transform of a digital signal defined as x[n] = 3 for -2 < n < 2, with participants confirming the calculation process and results. The Fourier transform is derived using the summation formula, leading to the expression 3(1 + 2cos(ω) + 2cos(2ω)). A second signal, x[n] = -2n, is introduced, prompting further calculations and simplifications, with participants discussing the correct forms for amplitude and phase characteristics of the Fourier transforms. The conversation also touches on using Excel for sketching the amplitude and phase, emphasizing the importance of understanding the magnitude and phase relationships in signal processing. Overall, the thread provides insights into Fourier transform calculations and their implications in digital signal analysis.
andrey21
Messages
475
Reaction score
0
Find the Fourier transform of the following aperodic digital signal



x[n] = 3

for -2<n<2


3. Not to surer where to start on this one any help would be great thanks
 
Physics news on Phys.org
I presume the function is zero for |n| &gt; 2, correct?

Then by definition, the Fourier transform is

X(\omega) = \sum_{n = -2}^{2} 3 e^{-i \omega n}

Let us know where you got stuck.
 
Ok so working form that I obtained:

3{ d[n-2] + d[n-1] + d[n] + d[n+1] + d[n+2] }e^(-jnw)

= 3 {e^(-2jw) + e^(-jw) + 1 + e^(jw) + e^(+2jw)

= 3 (1 + 2COSw + 2COS2w)

Is this correct?
 
Jamiey1988 said:
Ok so working form that I obtained:

3{ d[n-2] + d[n-1] + d[n] + d[n+1] + d[n+2] }e^(-jnw)

= 3 {e^(-2jw) + e^(-jw) + 1 + e^(jw) + e^(+2jw)

= 3 (1 + 2COSw + 2COS2w)

Is this correct?

Looks good to me.
 
Thanks jbunnii. I do have another question it is exactly the same as the previous one except. x[n] = -2n. Its a little bit more complicated how would I go about solving that.
 
By the way, there is another, equivalent way to write the solution. To see it, note that

e^{-2i\omega} + e^{-i\omega} +1 + e^{i\omega} + e^{2i\omega} = e^{-2i\omega}(1 + e^{i\omega} + e^{2i\omega} +1 + e^{3i\omega} + e^{4i\omega})

which equals

e^{-2i\omega}\frac{1 - e^{5i\omega}}{1 - e^{i\omega}}

You can rearrange this to get:

e^{-2i\omega} \left(\frac{e^{2.5i\omega}}{e^{0.5i\omega}}\right)\left(\frac{e^{-2.5i\omega}-e^{2.5i\omega}}{e^{-0.5i\omega}-e^{0.5i\omega}}\right)

which simplifies to

\frac{\sin(2.5\omega)}{\sin(0.5\omega)}
 
Last edited:
Jamiey1988 said:
Thanks jbunnii. I do have another question it is exactly the same as the previous one except. x[n] = -2n. Its a little bit more complicated how would I go about solving that.

Is it defined this way for all n, or is it zero outside a certain interval?
 
It says for -2<n<2 like in the previous question so I am guessing all other values are 0.
 
Jamiey1988 said:
It says for -2<n<2 like in the previous question so I am guessing all other values are 0.

So it's

X(\omega) = \sum_{n = -2}^{2} (-2n) e^{-i \omega n}

Try writing it out term by term and using trig identities like you did with the previous question.
 
  • #10
Oh ok I will try that approach and see what answer i come up with. Just a quick question where I got my answer 3(1+2cosw+2cos2w) it was taken from an example given to me so I am nt sure how to get from:
3 {e^(-2jw) + e^(-jw) + 1 + e^(jw) + e^(+2jw)
to
3(1+2cosw+2cos2w)
 
  • #11
Never mind i see now it comes from trig idenitity

cos w = 1/2 ( e^(jw) + e^(-jw)
 
  • #12
Jamiey1988 said:
Never mind i see now it comes from trig idenitity

cos w = 1/2 ( e^(jw) + e^(-jw)

Right.
 
  • #13
Rite for the second question i posed which was to find fouier transform of x[n] = -2n i got the following:

= -4e^(-2jw) -2e^(-jw) + 0 + 2e^(jw) + 4e^(2jw)

Is this correct, i calculated each term individually.
 
  • #14
Yes it's correct, but it can be simplified.

What is

-e^{-2i\omega} + e^{2i\omega} ?
 
  • #15
I agree with all the posts here except this one:
jbunniii said:
By the way, there is another, equivalent way to write the solution. To see it, note that

e^{-2i\omega} + e^{-i\omega} +1 + e^{i\omega} + e^{2i\omega} = e^{-2i\omega}(1 + e^{i\omega} + e^{2i\omega} +1 + e^{3i\omega} + e^{4i\omega})
You have an extra "1" term on the right.
jbunniii said:
which equals

e^{-2i\omega}\frac{1 - e^{5i\omega}}{1 - e^{i\omega}}
I don't see this, either.
I'd go with the expression that Jamiey1988 found.
 
  • #16
marcusl said:
I agree with all the posts here except this one:

You have an extra "1" term on the right.

You're right. Poor editing on my part.

I don't see this, either.
I'd go with the expression that Jamiey1988 found.

If z \neq 1 is a complex number, then

\sum_{n=0}^{N-1}z^n = \frac{1 - z^N}{1 - z}

To verify this, write out the sum term by term, and multiply both sides by 1 - z. The terms telescope and you are left with 1 - z^N.

The final answer,

\frac{\sin(2.5\omega)}{\sin(0.5\omega)},

is interesting because it is analogous to the \sin(\omega)/\omega (or "sinc" function) that one obtains for the Fourier transform of a rectangular function of a continuous variable.

This form is also very useful in signal processing, as it allows one to easily answer the question "how much attenuation results if I filter a sinusoidal input signal with frequency \omega using a moving average filter (of length 5 in this case)?"

Jamiey1988's answer is mathematically correct, but whether it is the best form depends on the context. If it is homework for a signal processing course (as suggested by the "digital signal" terminology in the original question), the instructor might implicitly expect the "sin/sin" form.
 
Last edited:
  • #17
Oh sure! Summation to the Dirichlet kernel. Sorry I didn't recognize it.
 
  • #18
jbunni replying to ur post:

what is:

-e^(-2iw) +e^(2iw)

given the trig identity

sin w = 1/j^(2) . (e^jw - e^-jw)

I obtained

4sin2W + 2sinW
= 2(2sinw + sinw)

is this correct?/
 
  • #19
Jamiey1988 said:
jbunni replying to ur post:

what is:

-e^(-2iw) +e^(2iw)

given the trig identity

sin w = 1/j^(2) . (e^jw - e^-jw)

I obtained

4sin2W + 2sinW
= 2(2sinw + sinw)

is this correct?/

That's not quite correct.

The trig identity is

\sin x = \frac{1}{2i}(e^{ix} - e^{-ix})

Now multiply both sides by 2i to get the formula you need. In particular, notice that your answer will be imaginary, not real.
 
Last edited:
  • #20
Ah yes so the trig identity I would obtain is:

2i sin x = e^(ix) - e^-(ix)

from this would the answer be:

8i sin2x + 4i sinx

4i (sin2x+sinx)

correct?
 
  • #21
Jamiey1988 said:
Ah yes so the trig identity I would obtain is:

2i sin x = e^(ix) - e^-(ix)

from this would the answer be:

8i sin2x + 4i sinx

4i (sin2x+sinx)

correct?

Looks good to me.
 
  • #22
Great now all the final part of the question states is to sketch the amplitude and characterisitics of these spectra pver the range:

-3\pi < \Omega < 3\pi

Can I just do this using Excel for example, and use the Fourier transform an various points to establish a sketch?
 
  • #23
Jamiey1988 said:
Great now all the final part of the question states is to sketch the amplitude and characterisitics of these spectra pver the range:

-3\pi < \Omega < 3\pi

Can I just do this using Excel for example, and use the Fourier transform an various points to establish a sketch?

Certainly it's possible to do this with Excel. Whether you should do that or sketch it manually is up to you (and your instructor).

Supposing you wanted to do it manually, the first step would be to try to come up with as simple an expression as possible for the magnitude.

For the previous problem it is this:

\left|\frac{\sin(2.5\omega)}{\sin(0.5\omega)}\right|

which is a function you should try to become familiar with if you are studying signal processing. Sketching it manually (at least once) is a good idea.
 
  • #24
Thanks Jbunnii I have sketched the first one no problem using Excel the second is causing me more problems as it contains imaginary numbers. How would I go about sketching this??
 
  • #25
Jamiey1988 said:
Thanks Jbunnii I have sketched the first one no problem using Excel the second is causing me more problems as it contains imaginary numbers. How would I go about sketching this??

Can you write down an expression for the magnitude of

4i (\sin 2x + \sin x)?
 
  • #26
Ah i see so for example magnitude of the first one would be:

3(1+2cosw+2cos2w)

= 3 . SQRT((1+2cosw+2cos2w)^2)

and sketch using the above.
 
  • #27
Jamiey1988 said:
Ah i see so for example magnitude of the first one would be:

3(1+2cosw+2cos2w)

= 3 . SQRT((1+2cosw+2cos2w)^2)

and sketch using the above.

Right, or simply

3\cdot|1 + 2\cos \omega + 2 \cos 2\omega |

i.e. no need to actually perform the square and square root operations. Absolute value is much simpler - just get rid of any negative sign that pops up.
 
  • #28
Ok so from what u wrote above is it 3 mulitplied by the magnitude of (1+2cosw+2cos2w)?
 
  • #29
Jamiey1988 said:
Ok so from what u wrote above is it 3 mulitplied by the magnitude of (1+2cosw+2cos2w)?

Yes, that's the magnitude of the Fourier transform.

Are you also asked for the phase? Do you know what that would be in this case?
 
  • #30
Well the question just states find the Fourier transform which I have then plot amplitude and phase characteristics so I think i mite. I am nt too sure what it would be??
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
0
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K