1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB user defined inverse fourier transform

  1. Jun 10, 2010 #1
    Hi i am stuck with a program in MATLAB to find the time domain impulse response of a system from its continuous transfer function in the frequency domain.

    Here is the program-
    delt=1.5625e-9; %definition of delta t(sampling time).To be taken sufficiently small depending upon the time constant of the original signal.

    delomg=1/(N*delt); % Kept sufficiently small to prevent repetition of curves in the plot due to aliasing .

    komg=[-100*pi/(delt):delomg:100*pi/(delt)]; %matrix containing the omegas over which the summation is done.Should be sufficiently large to cover all the frequencies present the original signal.

    s=sqrt(-1)*komg; %definition of s=jw


    transfer_func_image= 1 -(s.*r1*(c1+c2) +1)./(s.^2.*r1.*r2.*c1.*c2 + s.*(r1*c1 + r2*c2+ r1*c2) +1);

    h_image_dirac=zeros(1,N); %initialisation of the h_image matrix for better speed

    for n=1:N % first sample at t=0
    t=(n-1)*delt;
    sumint_image = sum(transfer_func_image.*exp(s.*t).*delomg);
    h_image_dirac(n)=(1./(2*pi)).*sumint_image;
    end


    This program defines a transfer function in terms of s.
    The last part of the program starting from for n= 1:N , then integrates the transfer function by multiplying the transfer function vector with exp(j*omega*t) and summing the vector obtained after multiplying it with delomg.This duplicates the formula of laplace transform for the special case where the real part of s =0 and is thus effectively inverse fourier transform.

    The problem is the program is not giving the right result.If i find the value of the transfer function above at 2Meg, it is of the order of 10^-4
    but if i use this program to obtain the impulse response and then convolve that with a sine wave at 2meg the answer is of the order of 100 and not 10^-4.

    Where am i going wrong?This program works fine for another transfer function which i have tested.


    please help.

    thanks a lot.Please contact me if the problem is not clear.any help wud be appreciated.It is really important.
     
  2. jcsd
  3. Jun 12, 2010 #2
    Your transfer function is a biquad filter. To get an impulse response, the transfer function has to be applied to an impulse. I'm not sure if I understand the question right, but you could convert the transfer function to discrete form (the Z-domain), and then get an impulse response. This is often done by using the "bilinear transform".
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: MATLAB user defined inverse fourier transform
Loading...