test-bench-nano-hexapod/matlab/identif_S_T.m

25 lines
562 B
Mathematica
Raw Normal View History

2021-08-11 18:03:35 +02:00
load('mat/T_S_meas_Dz_3m_hac_svd_iff.mat', 't', 'de', 'Vs', 'u', 'Va', 'Rx', 'Kiff', 'Khac_iff_struts');
Ts = (t(end) - t(1))/(length(t)-1);
Fs = 1/Ts;
win = hanning(ceil(10*Fs)); % Hannning Windows
load('mat/jacobian.mat', 'J');
y = (inv(J)*de')';
[T, f] = tfestimate(Rx(:,3), y(:,3), win, [], [], 1/Ts);
[S, ~] = tfestimate(Rx(:,3), Rx(:,3)-y(:,3), win, [], [], 1/Ts);
figure;
hold on;
plot(f, abs(T));
plot(f, abs(S));
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('Amplitude');
grid;
xlim([1, 2e3]);