add all files
This commit is contained in:
60
C3-test-bench-struts/test_struts_1_flexible_modes.m
Normal file
60
C3-test-bench-struts/test_struts_1_flexible_modes.m
Normal file
@@ -0,0 +1,60 @@
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
%% Path for functions, data and scripts
|
||||
addpath('./mat/'); % Path for data
|
||||
addpath('./src/'); % Path for functions
|
||||
|
||||
%% Colors for the figures
|
||||
colors = colororder;
|
||||
|
||||
%% Load Data (without the encoder)
|
||||
bending_X = load('strut_spur_res_x_bending.mat');
|
||||
bending_Y = load('strut_spur_res_y_bending.mat');
|
||||
torsion_Z = load('strut_spur_res_z_torsion.mat');
|
||||
|
||||
%% Load Data (with the encoder)
|
||||
bending_X_enc = load('strut_spur_res_x_bending_enc.mat');
|
||||
bending_Y_enc = load('strut_spur_res_y_bending_enc.mat');
|
||||
torsion_Z_enc = load('strut_spur_res_z_torsion_enc.mat');
|
||||
|
||||
%% Plot the responses (without the encoder)
|
||||
figure;
|
||||
hold on;
|
||||
plot(bending_X.FFT1_AvSpc_1_RMS_X_Val, bending_X.FFT1_AvSpc_1_RMS_Y_Val, ...
|
||||
'DisplayName', 'X-Bending')
|
||||
plot(bending_Y.FFT1_AvSpc_1_RMS_X_Val, bending_Y.FFT1_AvSpc_1_RMS_Y_Val, ...
|
||||
'DisplayName', 'Y-Bending')
|
||||
plot(torsion_Z.FFT1_AvSpc_1_RMS_X_Val, torsion_Z.FFT1_AvSpc_1_RMS_Y_Val, ...
|
||||
'DisplayName', 'Z-torsion');
|
||||
text(226, 1.5e-4,{'226Hz'}, 'VerticalAlignment', 'bottom','HorizontalAlignment','center')
|
||||
text(310, 6e-5,{'337Hz'}, 'VerticalAlignment', 'bottom','HorizontalAlignment','center')
|
||||
text(398, 1.5e-4,{'398Hz'}, 'VerticalAlignment', 'bottom','HorizontalAlignment','center')
|
||||
hold off;
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Amplitude');
|
||||
xlim([50, 8e2]); ylim([5e-7, 3e-4])
|
||||
xticks([50, 100, 500]);
|
||||
legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
|
||||
|
||||
%% Plot the responses (with the encoder)
|
||||
figure;
|
||||
hold on;
|
||||
plot(bending_X_enc.FFT1_AvSpc_1_RMS_X_Val, bending_X_enc.FFT1_AvSpc_1_RMS_Y_Val, ...
|
||||
'DisplayName', 'X-Bending')
|
||||
plot(bending_Y_enc.FFT1_AvSpc_1_RMS_X_Val, bending_Y_enc.FFT1_AvSpc_1_RMS_Y_Val, ...
|
||||
'DisplayName', 'Y-Bending')
|
||||
plot(torsion_Z_enc.FFT1_AvSpc_1_RMS_X_Val, torsion_Z_enc.FFT1_AvSpc_1_RMS_Y_Val, ...
|
||||
'DisplayName', 'Z-torsion');
|
||||
text(198, 4e-5,{'198Hz'}, 'VerticalAlignment', 'bottom','HorizontalAlignment','center')
|
||||
text(293, 6e-5,{'293Hz'}, 'VerticalAlignment', 'bottom','HorizontalAlignment','center')
|
||||
text(381, 1e-4,{'381Hz'}, 'VerticalAlignment', 'bottom','HorizontalAlignment','center')
|
||||
hold off;
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Amplitude');
|
||||
xlim([50, 8e2]); ylim([5e-7, 3e-4])
|
||||
xticks([50, 100, 500]);
|
||||
legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1);
|
Reference in New Issue
Block a user