2021-07-01 17:45:57 +02:00
|
|
|
%%
|
2021-08-11 18:03:35 +02:00
|
|
|
clear; close all; clc;
|
2021-07-01 17:45:57 +02:00
|
|
|
|
2021-06-30 23:22:08 +02:00
|
|
|
%%
|
2021-08-11 18:03:35 +02:00
|
|
|
% load('mat/Kiff.mat', 'Kiff');
|
|
|
|
s = zpk( 's');
|
|
|
|
Kiff = -2e2*...
|
|
|
|
(1/(s + 2*pi*20))*... % LPF: provides integral action above x[Hz]
|
|
|
|
(s/(s + 2*pi*20))*... % HPF: limit low frequency gain
|
|
|
|
(1/(1 + s/2/pi/400))*... % LPF: more robust to high frequency resonances
|
|
|
|
eye(6); % Diagonal controller
|
2021-06-30 23:22:08 +02:00
|
|
|
|
2021-07-01 17:45:57 +02:00
|
|
|
%%
|
|
|
|
load('sim_data/data_sim.mat', 'Ts')
|
|
|
|
Kiff = c2d(Kiff, Ts, 'Tustin');
|
|
|
|
|
2021-06-30 23:22:08 +02:00
|
|
|
%%
|
|
|
|
save('sim_data/Kiff.mat', 'Kiff');
|