インパクトハンマーを使用して励起され、加速度計が取り付けられているテストサンプルの固有周波数を見つけるために、次のコードを作成しました。しかし、私はinterp_accelerance_dB_first
で立ち往生した。この補間はNaN値のセットを作成し、私はその理由を知らない。私はそれが奇妙なので、interp_accelerance
は正常に働いたと思う。私は誰かが私を助けることを願っていますx,y,o
がありますが、一般的にinterp1
何を知らなくても確かに言うのは難しいMatlabは自然周波数を見つけ、interp1関数はNaN値を作成します
N = 125000;
fs = 1/(x(2)-x(1));
ts = 1/fs;
f = -fs/2:fs/(N-1):fs/2;
% Set x-axis of graph
x_max = (N-1)*ts;
x_axis=0:ts:x_max;
% find the first natural frequency between these boundaries
First_lower_boundary = 15;
First_upper_boundary = 30;
Input = abs(fft(y)); %FFT input force
Output = abs(fft(o)); %FFT output acceleration
Accelerance = Output./Input;
bin_vals = [0 : N-1];
fax_Hz = bin_vals*fs/N;
N_2 = ceil(N/2);
% Interpolate accelerance function in order to be able to average all accelerance functions
Interp_accelerance = interp1(fax_Hz(1:N_2),Accelerance(1:N_2),x_axis);
% --- Find damping ratio of first natural frequency
% Determine the x-axis (from the boundries at the beginning of this script)
x_axis_first_peak = First_lower_boundary:ts:First_upper_boundary;
% Accelerance function with a logarithmic scale [dB]
Accelerance_dB_first = 20*log10(Accelerance(First_lower_boundary:First_upper_boundary));
% Interpolate the accelerance function [dB]
Interp_accelerance_dB_first = interp1(fax_Hz(First_lower_boundary:First_upper_boundary),Accelerance_dB_first,x_axis_first_peak);
'x'と' y'の値は何ですか? – gariepy