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

Solving linear systems using fourier transform

  1. Sep 14, 2012 #1
    I want to use Matlab and fourier transforms to solve linear systems and am attempting to implement a very simple linear system (with the idea of implimenting a much more complex one later) that I can't seem to get working. The system will take the derivative with respect to time of the input as follows:

    output(t) = (d/dt)*input(t)

    Find the transfer function by taking the Fourier transform of both sides and rearranging (F = Fourier transform):

    F[ output(t) ] = F[ (dinput/dt ]

    F[ (dinput/dt ] = 2*pi*i*f * F[ input(t) ]


    F[ output(t) ] = 2*pi*i*f * F[ input(t) ]

    and our transfer function, F[output(t)] / F[input(t)] = 2*pi*i*f = H(f)

    The final system is:

    output(t) = F-1[ 2*pi*i*f * F[ input(t) ] ]

    The code that I'm implementing in Matlab is posted below seems to work correctly if the input function is sin or cos, but for x2 (which should yield 2x as the output) doesn't work (also note that I'm having some issues with getting scaling right, but I'm not to worried about this at the moment) Any ideas?

    Code (Text):

    L_duration_s=1.0;       %sampling duration, L
    N_time_bins=1024;     % # samples


    %pinput waveform
    x_t=cos(2*pi*time_s);    %sin->cos

    %fourier transform of input

    %xfer function

    %calculation of output
    y_t=N_time_bins* ifft(y_f);
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted