nass-micro-station-measurem.../static-spindle/matlab/spindle_time_domain.m

76 lines
2.1 KiB
Mathematica
Raw Permalink Normal View History

%% Clear Workspace and Close figures
2019-03-14 16:40:28 +01:00
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
% Load the processed data
2019-03-14 16:40:28 +01:00
load('./mat/spindle_data.mat', 'spindle');
% Plot X-Y-Z position with respect to Time - 1rpm
2019-03-14 16:40:28 +01:00
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'});
% Plot X-Y-Z position with respect to Time - 60rpm
% The measurements for the spindle turning at 60rpm are shown figure [[fig:spindle_xyz_60rpm]].
2019-03-14 16:40:28 +01:00
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'});
% Plot Synchronous and Asynchronous - 1rpm
2019-03-14 16:40:28 +01:00
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'});
% Plot Synchronous and Asynchronous - 60rpm
% The data is split into its Synchronous and Asynchronous part (figure [[fig:spindle_60rpm_sync_async]]). We then use the Asynchronous part for the analysis in the following sections as we suppose that we can deal with the synchronous part with feedforward control.
2019-03-14 16:40:28 +01:00
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'});
% Plot X against Y
2019-03-14 16:40:28 +01:00
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'});
% Plot X against Y - Asynchronous
2019-03-14 16:40:28 +01:00
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'});