I am trying to get the frequency response of any transfer functions using the Fourier transform of the impulse response of the system. It works pretty well for most of the cases tested but I still have a problem with transfer functions in which there is an integrator (e.g. 1/s ; (4s+2)/(3s^2+s) etc.).
Let's take the example of a pure integrator with H(s) = 1/s. The impulse response obtained is a step function as expected but then, the Fourier transform of the impulse response does not give the expected theoretical results. Instead it gives really small results and do not lead to the classic characteristics of an integrator (-20dB/decade magnitude and -90deg phase) after processing.
Maybe a few lines of codes can be helpful if I was not clear enough:
h = tf(1,[1 0]);
t_step = .1;
t = [0 : t_step : 100000]';
[y,t1] = impulse(h,t);
y_fft = fft(y);
Do you know where this problem may come from? If you need further information, please let me know. I am working on MATLAB R2013b.