test-bench-apa/matlab/huddle_test.m
2020-07-20 10:55:38 +02:00

24 lines
429 B
Matlab

% Load Data
load('./mat/huddle_test.mat', 't', 'u', 'y');
% Time Domain Data
figure;
plot(t, y)
ylabel('Output Displacement [m]'); xlabel('Time [s]');
% PSD of Measurement Noise
Ts = t(end)/(length(t)-1);
Fs = 1/Ts;
win = hanning(ceil(1*Fs));
[pxx, f] = pwelch(y, win, [], [], Fs);
figure;
plot(f, sqrt(pxx));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');