Find Fourier transform and plot spectrum by hand & MATLAB

Click For Summary

Discussion Overview

The discussion revolves around finding the Fourier transform of a piecewise function defined over specific intervals and plotting its spectrum using MATLAB. Participants explore the properties of Fourier transforms, particularly in relation to segmented functions and triangular functions.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests that the Fourier transform should be computed as a single integral over the entire function, which is defined piecewise, rather than as separate transforms for each segment.
  • Another participant questions the definition of the triangular function as presented in their textbook and provides an online definition.
  • There is a proposal that the function can be expressed as a combination of triangular functions, specifically as ##y(t)=2\mathrm{tri}(\frac{t}{2})-\mathrm{tri}(t)##.
  • Concerns are raised about whether the proposed definition of the function accurately represents the original piecewise function, particularly in the regions outside ##[-1, 1]##.
  • One participant asserts that the Fourier transform of the triangular function leads to specific sinc functions, and they derive the Fourier transform of the proposed function as ##2\mathrm{sinc}^2(2f)-\mathrm{sinc}^2(f)##.
  • There is a discussion about the implications of negative values in the Fourier transform and whether the graph of the transform should match the original function.
  • A MATLAB script is shared, indicating an attempt to visualize the Fourier transform.

Areas of Agreement / Disagreement

Participants express differing views on how to approach the Fourier transform of the piecewise function, with some agreeing on the use of triangular functions while others question the validity of the proposed definitions. The discussion remains unresolved regarding the exact representation of the function and the implications of the Fourier transform's characteristics.

Contextual Notes

Participants note that the function is zero outside certain intervals, which may affect the Fourier transform's calculation. There are also concerns about the graphical representation of the Fourier transform, particularly regarding negative values.

Captain1024
Messages
44
Reaction score
2

Homework Statement


JSm3Tqt.png

Link: http://i.imgur.com/JSm3Tqt.png

Homework Equations


##\omega=2\pi t##
Fourier: ## Y(f)=\int ^{\infty}_{-\infty}y(t)\mathrm{exp}(-j\omega t)dt##
Linearity Property: ##ay_1(t)+by_2(t)=aY_1(f)+bY_2(f)##, where a and b are constants
Scaling Property: ##y(at)=\frac{1}{|a|}G(\frac{f}{a})##, where a is constant

The Attempt at a Solution


From the hint, I think I need to find the Fourier transform of the function for each region:
##(-2\leq t\leq -1)##: ##Y(f)=te^{-j\omega t}+\frac{j}{\omega}(e^{j\omega}-e^{j2\omega})##
##(-1\leq t\leq 1)##: ##Y(f)=\frac{j}{\omega}(e^{-j\omega}-e^{j\omega})##
##(1\leq t\leq 2)##: ##Y(f)=-te^{-j\omega t}+\frac{3j}{\omega}(e^{-j2\omega}-e^{-j\omega})##
Please let me know if you want to see my work.

Why do I need to use the scaling property and how do I use it?
 
Physics news on Phys.org
First of all, Fourier transform is an integral from (-infinity) to (+infinity) and because you function is defined in that way and it is zero in "most" of real line, the Fourier transform will be the sum of 3 different integrals (one integral from -2 to -1, one from -1 to +1, and one from +1 to +2, the integral from -infinity to -2 is zero, and zero is also the integral from +2 to +infinity). So , even when our function is defined in a segmented way, the Fourier transform is not segmented (we won't have 3 different Fourier transforms as you wrote, it is one transform (integral) that is the sum of 3 smaller integrals as I said above), so it doesn't mean that we find the Fourier transform in each segment, rather we work on the whole Fourier transform and break up the big integral as necessary.

Second the hint says to use the triangular function as basis. How is the triangular function being defined in your textbook?
 
Delta² said:
How is the triangular function being defined in your textbook?

The book I am using is "Introduction to Analog & Digital Communications" by Simon Haykin & Michael Moher, 2nd ed. They define the Fourier transform of a triangular pulse as ##AT^2\mathrm{sinc}^2(fT)##. That is all I could find in the book. However, I found the following definition of the unit triangle function online: ##\mathrm{tri}(t) = \begin{cases}1-|t| & |t| <1\\0 & |t|\geq 1\end{cases}##.
 
Ok i believe it is ##y(t)=2tri(\frac{t}{2})-tri(t)##. Can you verify this? If it is indeed true then all you have to use is linear and scaling properties of Fourier transform, to get the Fourier transform of y(t), knowing the transform of tri(t).
 
Last edited:
Delta² said:
Ok i believe it is ##y(t)=2tri(\frac{t}{2})-tri(t)##. Can you verify this?

Well, ##y(t)=2\mathrm{tri}(\frac{t}{2})-\mathrm{tri}(t)## is equivalent to a constant +1. So, that matches the given function over the region ##-1\leq t\leq 1## only.

To be honest, I'm stuck. I have not found a transform that agrees with the given function.

Is the following correct for defining y(t) in terms of the triangular function? ##y(t) = \begin{cases}2(\mathrm{tri}(\frac{t}{2})) & -2\leq t\leq -1\\2(\mathrm{tri}(\frac{t}{2}))-\mathrm{tri}(t) & -1\leq t\leq 1\\2(\mathrm{tri}(\frac{t}{2})) & 1\leq t\leq 2\end{cases}##
 
Captain1024 said:
Well, ##y(t)=2\mathrm{tri}(\frac{t}{2})-\mathrm{tri}(t)## is equivalent to a constant +1. So, that matches the given function over the region ##-1\leq t\leq 1## only.
it is +1 in [-1,1]. But look what happens for example in [-2,-1]

##-2\leq t \leq-1\implies tri(t)=0 , -1\leq \frac{t}{2}\leq\frac{-1}{2} \implies tri(t)=0 , tri(\frac{t}{2})=1-\frac{|t|}{2}\implies 2tri(\frac{t}{2})-tri(t)=2+t-0##
I believe if u take the other cases (-infinity,-2],[1,2],[2,+infinity] you ll get the desired result.
To see it more clearly make the graph for ##2tri(t/2)## and on the same graph also draw ##tri(t)##.
 
Captain1024 said:
Is the following correct for defining y(t) in terms of the triangular function? ##y(t) = \begin{cases}2(\mathrm{tri}(\frac{t}{2})) & -2\leq t\leq -1\\2(\mathrm{tri}(\frac{t}{2}))-\mathrm{tri}(t) & -1\leq t\leq 1\\2(\mathrm{tri}(\frac{t}{2})) & 1\leq t\leq 2\end{cases}##
this is correct, but then again no need to take cases because tri(t)=0 outside [-1,1].
 
Delta² said:
tri(t)=0 outside [-1,1].
I think I realize my mistake. When defined in terms of the triangular function, the given function is indeed ##y(t)=2tri(\frac{t}{2})-tri(t)##.
FT of ##\mathrm{tri}(t)##: ##\mathrm{sinc}^2(f)##
FT of ##\mathrm{tri}(\frac{t}{2})##: ##\mathrm{sinc}^2(2f)##
Therefore FT of y(t): ##2\mathrm{sinc}^2(2f)-\mathrm{sinc}^2(f)##
Which produces the following graph:
7iJhEdi.jpg

Link: http://i.imgur.com/7iJhEdi.jpg
Is this right? I'm concerned that the graph has values below the x-axis. Should the graph of the transform match the graph of the given function?
 
  • #10
There is absolutely no problem with Y(f) being negative or complex, the energy at frequency f is proportional to ##|Y(f)|^2##.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
10K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
26K
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K