Compare commits

..

No commits in common. "87a17bff733b4eb1b412c4a62f3de9e38c38233a" and "65abbd0ec7aa4b0298b9907bc36eda467ca63b48" have entirely different histories.

18 changed files with 0 additions and 49 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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];