matlab - Remove Known Harmonic from from Frequency Response Function -


i have input sine wave in time domain frequency of 10hz. trying code in matlab develop frequency response function 2dof modal analysis problem.

enter image description here

in output, there dominating peak @ 10hz, due input harmonic wave

question:

which best way remove known harmonic disturbance response(output) in matlab?

also, should when disturbing harmonic not known?

fs=1/dt; nfft = 2 ^ nextpow2 (l);                       %l length of signal y = fft (output_time(1,:), nfft) / l;          %response in time domain frequency domain x=fft(input_time,nfft)/l;                      %input in time frequency domain f = fs / 2 * linspace (0,1, nfft / 2 + 1);     %frequencies output_frequency=2 * abs (y (1: nfft / 2 + 1)); input_frequency=2 * abs (x (1: nfft / 2 + 1)); frf=(y(1: nfft / 2 + 1)./x(1: nfft / 2 + 1));  %frequency response functions 

thanks suggestions;i found answer required.

i used band stop filter solve problem:

order=2; lowfreq=9.5; hifreq=10.5; [b,a] = butter(order, [lowfreq hifreq]/(fs/2), 'stop'); filtered_response = filter(b,a,u(1,:)); 

Comments