I calculated FFT of response and force with Matlab code. And then I divided FFT response to FFT force and calculated FRF. This is for sdof. But I don't have true results.
I am writing more to try to explain this seemingly simple concept.
Recall one anaytical way of getting FRF of a 1-DoF system. We apply a sinusoidal excitation: m*x^2+c*x^1+k*x = F*sin(omega*t).
We assume the solution is x=X*sin(omega*t+phi) and solve it and get X/F which is a function of omega. In so doing, we imply the excitation frequency omega is a parameter that varies (but not with time), so that ratio X/F varies with omega, whcih is indeed the FRF.
In tests, one way of getting FRF is to apply F*sin(omega*t) and gradually vary omega,
such as sine sweep.Then we get amplitude of response X corresponding tot amplitude of excitation and then X/F gives the FRF. So you see, testing and the above anaytical approach are inthe same spirit.
However, in your simulation, your excitation has fixed constant frequency components (I do not know what they are, but they are fixed and constant during one simulation). Therefore the FFT of excitation only gives you some constant value or values for the contributions of the fixed frequency components involved in the excitation. As a result, FFT(excitation) / FFT(response) in your simulation gives you values of FRF at those fixed constant omega, not the whole FRF curve.
So your way of getting FRF from a time-domain simulation is not (sorry to say this) good.
I assume that your purpose of getting FRF is to identify system parameters, m, c, or k or vene nonlinearity. There are better ways of doing structural identifications.
I used this method before. and I calculate the displacement (xt_amp_fre.xls-contain different amplitide and frequency) of sdof system(w_n=2Hz) for 250 sinusoidal forces with different amplitude an frequency(fft curve_P.xls) with matlab code (onedof_force_vibration_w_damp_formula.m) then I divided amplitude displacement to amplitude force (calculate FRF) and I result true frequency(w_n=2Hz).
But when I I calculate the displacement (xt_for_fft_odof.xls) of sdof system(w_n=2Hz) for time history (force_total_sum.xls-summation of 250 sinusoidal forces) with matlab code (shetabkhati1dof.m) and then calculate FRF (FRF_matlab.m) I result (w_n=1.25Hz).
I looked at your FRF (I assumed it is the 3rd graph in 1.jpg). It looks all right to me.
You have got a 1-DoF system and there is only 1 natural frequency. So if you excite it with a sine sweep, the FRF will displapy a peak at the natural frequecny and a decaying trend to zero after the resonance peak. Did I miss something?
The code posted at http://rotorlab.tamu.edu/Dynamics_and_Vibrations/Other%20docs/MATLAB_Handbook.pdf shows that FRF is obtained through varying driving frequency (as I suggested in my previous reply).