2020-08-27 18:00:20 +02:00
|
|
|
%%
|
2020-08-18 18:25:34 +02:00
|
|
|
s = tf('s');
|
2020-08-27 18:00:20 +02:00
|
|
|
Ts = 1e-4; % [s]
|
2020-08-18 18:25:34 +02:00
|
|
|
|
2020-08-27 18:00:20 +02:00
|
|
|
%% Pre-Filter
|
|
|
|
% Glpf = 1/(1 + s/2/pi/2e3);
|
2020-08-28 17:15:21 +02:00
|
|
|
G_pf = 1/(1 + s/2/pi/50); % Used to excite with constant velocity
|
|
|
|
G_pf = c2d(G_pf, Ts, 'tustin');
|
|
|
|
|
|
|
|
%% Force Sensor Filter (HPF)
|
|
|
|
Gf_hpf = s/(s + 2*pi*2);
|
|
|
|
Gf_hpf = c2d(Gf_hpf, Ts, 'tustin');
|
2020-08-18 18:25:34 +02:00
|
|
|
|
2020-08-27 18:00:20 +02:00
|
|
|
%% IFF Controller
|
2020-08-28 17:15:21 +02:00
|
|
|
Kiff = 1/(s + 2*pi*2);
|
2020-08-27 18:00:20 +02:00
|
|
|
Kiff = c2d(Kiff, Ts, 'tustin');
|
|
|
|
|
|
|
|
%% Excitation Signal
|
|
|
|
Tsim = 180; % Excitation time + Measurement time [s]
|
|
|
|
|
|
|
|
t = 0:Ts:Tsim;
|
2020-08-28 17:15:21 +02:00
|
|
|
% u_exc = timeseries(chirp(t, 0.1, Tsim, 1e3, 'logarithmic'), t);
|
|
|
|
u_exc = timeseries(chirp(t, 40, Tsim, 400, 'logarithmic'), t);
|