Update analysis

This commit is contained in:
2021-06-09 19:03:07 +02:00
parent e051f58428
commit 6874358160
20 changed files with 8918 additions and 810 deletions

View File

@@ -1,25 +0,0 @@
%%
tg = slrt;
f = SimulinkRealTime.openFTP(tg);
mget(f, 'data/data.dat');
close(f);
%% Convert the Data
data = SimulinkRealTime.utils.getFileScopeData('data/data.dat').data;
V = data(:, 1);
d = data(:, 2)*1000e-6/3.333;
t = data(:, end);
%% Save
save('mat/stroke_apa_1stacks_2.mat', 't', 'V', 'd');
%%
d = d - mean(d(t > 1.9 & t < 2.0));
figure;
plot(t, d)
figure;
plot(V, d)

View File

@@ -1,24 +0,0 @@
Fs = 10e3; % [Hz]
Ts = 1/Fs; % [s]
%%
freq_LPF = 0.5; % [Hz]
s = tf('s');
G_lpf = (1)/(1 + s/2/pi/freq_LPF);
Gz = c2d(G_lpf, Ts, 'tustin');
%%
t = 0:Ts:12;
V = -1*ones(size(t));
t0 = 2; t1 = t0 + 1;
V(t < t0-1) = 0;
V(t > t0 & t < t0 + pi) = 3.25 + 4.25*cos(t(t > t0 & t < t0 + pi) - t0 + pi);
V(t > t0 + pi & t < t1 + pi) = 7.5;
V(t > t1 + pi & t < t1 + 2*pi) = 3.25 + 4.25*cos(t(t > t1 + pi & t < t1 + 2*pi) - t1 + pi);
V(t > t1 + 2*pi + 2) = 0;
w0 = 2*pi*10; xi = 1;
V = lsim(1/(1 + 2*xi*s/w0 + s^2/w0^2), V, t);
Vin = [t', V];

View File

@@ -16,9 +16,9 @@ arguments
args.Gs (1,1) double {mustBeNumeric} = 0
% For 2DoF
args.k (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*0.35e6
args.ke (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*1.5e6
args.ka (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*43e6
args.k (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*0.38e6
args.ke (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*1.75e6
args.ka (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*3e7
args.c (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*3e1
args.ce (6,1) double {mustBeNumeric, mustBePositive} = ones(6,1)*2e1
@@ -48,7 +48,7 @@ end
if args.Ga == 0
switch args.type
case '2dof'
actuator.Ga = -46.4;
actuator.Ga = -30.0;
case 'flexible frame'
actuator.Ga = 1; % TODO
case 'flexible'

Binary file not shown.

Binary file not shown.