nass-micro-station-measurem.../Spindle/spindle_time_domain.m

74 lines
1.8 KiB
Mathematica
Raw Normal View History

2019-03-14 16:40:28 +01:00
%%
clear; close all; clc;
%% Load Spindle Data
load('./mat/spindle_data.mat', 'spindle');
%% Plot X-Y-Z position with respect to Time
figure;
hold on;
plot(spindle.rpm1.time, spindle.rpm1.x);
plot(spindle.rpm1.time, spindle.rpm1.y);
plot(spindle.rpm1.time, spindle.rpm1.z);
hold off;
xlabel('Time [s]'); ylabel('Amplitude [m]');
legend({'tx - 1rpm', 'ty - 1rpm', 'tz - 1rpm'});
exportFig('spindle_xyz_1rpm', 'wide-normal');
%% Plot X-Y-Z position with respect to Time
figure;
hold on;
plot(spindle.rpm60.time, spindle.rpm60.x);
plot(spindle.rpm60.time, spindle.rpm60.y);
plot(spindle.rpm60.time, spindle.rpm60.z);
hold off;
xlabel('Time [s]'); ylabel('Amplitude [m]');
legend({'tx - 60rpm', 'ty - 60rpm', 'tz - 60rpm'});
exportFig('spindle_xyz_60rpm', 'normal-normal');
%%
figure;
hold on;
plot(spindle.rpm1.time, spindle.rpm1.x);
plot(spindle.rpm1.time, spindle.rpm1.xasync);
hold off;
xlabel('Time [s]'); ylabel('Amplitude [m]');
legend({'tx - 1rpm - Sync', 'tx - 1rpm - Async'});
exportFig('spindle_1rpm_sync_async', 'normal-normal');
%%
figure;
hold on;
plot(spindle.rpm60.time, spindle.rpm60.x);
plot(spindle.rpm60.time, spindle.rpm60.xasync);
hold off;
xlabel('Time [s]'); ylabel('Amplitude [m]');
legend({'tx - 60rpm - Sync', 'tx - 60rpm - Async'});
exportFig('spindle_60rpm_sync_async', 'wide-normal');
%% Plot X against Y
figure;
hold on;
plot(spindle.rpm1.x, spindle.rpm1.y);
plot(spindle.rpm60.x, spindle.rpm60.y);
hold off;
xlabel('X Amplitude [m]'); ylabel('Y Amplitude [m]');
legend({'1rpm', '60rpm'});
exportFig('spindle_xy_1_60rpm', 'normal-normal');
%% Plot X against Y
figure;
hold on;
plot(spindle.rpm1.xasync, spindle.rpm1.yasync);
plot(spindle.rpm60.xasync, spindle.rpm60.yasync);
hold off;
xlabel('X Amplitude [m]'); ylabel('Y Amplitude [m]');
legend({'1rpm', '60rpm'});
exportFig('spindle_xy_1_60rpm_async', 'normal-normal');