Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Using Fourier analysis to find frequency-amplitude spectrum?

  1. Jan 22, 2005 #1
    The signal is from a voltage supply. I see lots of pages on the internet about this, such as this one, which shows what the magnitude spectrum looks like for a square wave with an arbitrary number of co-efficients. But how would I actually create that graph myself?
  2. jcsd
  3. Jan 22, 2005 #2


    User Avatar
    Science Advisor
    Homework Helper

    Is this a question of COMPUTER PROGRAMMING,MATHS or PHYSICS??

    Think deep...To me it looks like pogramming...What programming languages do u know?

  4. Jan 22, 2005 #3
    It's a math question I suppose. I need to know the steps to find a fourier transformation. I know that MATLAB and other computer programs can solve this type of problem, but I want to understand the math behind it.
  5. Jan 22, 2005 #4

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    the Fourier coefficitents are calculated using the formulas

    [tex] F(x) = \sum^{\infty} _{0} A_{n}\cos\left(\frac{n\pi x}{a} \right ) + B_{n}\sin\left (\frac{n\pi x}{a}\right )[/tex]


    [tex] A_{n} =\frac{1}{a} \int _{-a} ^{a} F(x)\cos\left (\frac{n\pi x}{a}\right ) dx [/tex]


    [tex] B_{n} =\frac{1}{a} \int _{-a} ^{a} F(x)\sin\left (\frac{n\pi x}{a} \right ) dx [/tex]

    from here plug in the periodic function and do the integrals...........
  6. Jan 22, 2005 #5
    Wait, what is a?
  7. Jan 22, 2005 #6

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    a is the periodicity of the signal..........
  8. Jan 23, 2005 #7
    Thanks for the help Dr. Transport. But in the end I ended up using this formula:

    [tex]f_n=\frac{1}{T}\int_0^T v(t) e^{-j n \omega t} dt[/tex]

    where n is some arbitrary number of coefficients. Also, n is the index of f (an array). Then I plotted [tex]\overrightarrow{\left|f\right|}_n[/tex] versus [tex]\frac{n}{T}[/tex]

    I don't fully understand this, but it seemed to work.
    Last edited: Jan 23, 2005
  9. Dec 22, 2009 #8
    the last equation stated is complex Fourier series while the earlier stated equation is trigonometry Fourier series. i'm done.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook