new identification data
This commit is contained in:
parent
a59c0b2007
commit
5e9c385767
BIN
mat/identification_chirp_01_1000_iff.mat
Normal file
BIN
mat/identification_chirp_01_1000_iff.mat
Normal file
Binary file not shown.
BIN
mat/identification_chirp_02_2000_iff.mat
Normal file
BIN
mat/identification_chirp_02_2000_iff.mat
Normal file
Binary file not shown.
BIN
mat/identification_chirp_40_400_bis.mat
Normal file
BIN
mat/identification_chirp_40_400_bis.mat
Normal file
Binary file not shown.
BIN
mat/identification_noise.mat
Normal file
BIN
mat/identification_noise.mat
Normal file
Binary file not shown.
BIN
mat/identification_noise_bis.mat
Normal file
BIN
mat/identification_noise_bis.mat
Normal file
Binary file not shown.
@ -17,7 +17,7 @@ u = data(:, 6);
|
|||||||
f_meas = data(:, 7);
|
f_meas = data(:, 7);
|
||||||
t = data(:, 8);
|
t = data(:, 8);
|
||||||
|
|
||||||
save('./mat/identification_noise_iff.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
save('./mat/identification_noise_bis.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
||||||
|
|
||||||
%%
|
%%
|
||||||
d = detrend(d, 0);
|
d = detrend(d, 0);
|
||||||
|
@ -88,7 +88,7 @@ title('Huddle Test')
|
|||||||
legend();
|
legend();
|
||||||
|
|
||||||
%% Compare Theoretical model with identified one
|
%% Compare Theoretical model with identified one
|
||||||
id_ol = load('./mat/identification_chirp_40_400.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
id_ol = load('./mat/identification_noise_bis.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
||||||
|
|
||||||
% Detrend Data
|
% Detrend Data
|
||||||
id_ol.d = detrend(id_ol.d, 0);
|
id_ol.d = detrend(id_ol.d, 0);
|
||||||
@ -117,7 +117,7 @@ hold off;
|
|||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
ax2 = subplot(2, 1, 2);
|
||||||
hold on;
|
hold on;
|
||||||
plot(f, 180/pi*unwrap(angle(tf_fmeas_est)), '-')
|
plot(f, 180/pi*angle(tf_fmeas_est), '-')
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||||
hold off;
|
hold off;
|
||||||
@ -198,10 +198,10 @@ xlim([40, 400]);
|
|||||||
% Model
|
% Model
|
||||||
wz = 2*pi*103;
|
wz = 2*pi*103;
|
||||||
xi_z = 0.01;
|
xi_z = 0.01;
|
||||||
wp = 2*pi*237;
|
wp = 2*pi*238;
|
||||||
xi_p = 0.015;
|
xi_p = 0.015;
|
||||||
|
|
||||||
Giff = -20*(s^2 + 2*xi_z*s*wz + wz^2)/(s^2 + 2*xi_p*s*wp + wp^2);
|
Giff = 2*(s^2 + 2*xi_z*s*wz + wz^2)/(s^2 + 2*xi_p*s*wp + wp^2);
|
||||||
|
|
||||||
% Comparison model and identification
|
% Comparison model and identification
|
||||||
figure;
|
figure;
|
||||||
@ -232,7 +232,7 @@ hold on;
|
|||||||
plot(real(pole(Giff)), imag(pole(Giff)), 'kx');
|
plot(real(pole(Giff)), imag(pole(Giff)), 'kx');
|
||||||
plot(real(tzero(Giff)), imag(tzero(Giff)), 'ko');
|
plot(real(tzero(Giff)), imag(tzero(Giff)), 'ko');
|
||||||
for i = 1:length(gains)
|
for i = 1:length(gains)
|
||||||
cl_poles = pole(feedback(Giff, -gains(i)/(s + 2*pi*2)));
|
cl_poles = pole(feedback(Giff, gains(i)/(s + 2*pi*2)));
|
||||||
plot(real(cl_poles), imag(cl_poles), 'k.');
|
plot(real(cl_poles), imag(cl_poles), 'k.');
|
||||||
end
|
end
|
||||||
ylim([0, 1800]);
|
ylim([0, 1800]);
|
||||||
@ -242,7 +242,7 @@ ylabel('Imaginary Part')
|
|||||||
axis square
|
axis square
|
||||||
|
|
||||||
% Optimal Controller
|
% Optimal Controller
|
||||||
Kiff_opt = -110/(s + 2*pi*2);
|
Kiff_opt = 1100/(s + 2*pi*2);
|
||||||
|
|
||||||
%% New identification
|
%% New identification
|
||||||
id_ol = load('./mat/identification_chirp_40_400.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
id_ol = load('./mat/identification_chirp_40_400.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
||||||
@ -287,7 +287,7 @@ linkaxes([ax1,ax2], 'x');
|
|||||||
xlim([40, 400]);
|
xlim([40, 400]);
|
||||||
|
|
||||||
%% Estimation of the inertial sensor transfer functions
|
%% Estimation of the inertial sensor transfer functions
|
||||||
id = load('./mat/identification_noise_iff.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
id = load('./mat/identification_noise.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
||||||
ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
|
||||||
|
|
||||||
% Compare PSD
|
% Compare PSD
|
||||||
|
Binary file not shown.
13
setup.m
13
setup.m
@ -4,15 +4,20 @@ Ts = 1e-4; % [s]
|
|||||||
|
|
||||||
%% Pre-Filter
|
%% Pre-Filter
|
||||||
% Glpf = 1/(1 + s/2/pi/2e3);
|
% Glpf = 1/(1 + s/2/pi/2e3);
|
||||||
Glpf = 1/(1 + s/2/pi/50); % Used to excite with constant velocity
|
G_pf = 1/(1 + s/2/pi/50); % Used to excite with constant velocity
|
||||||
Gz = c2d(Glpf, Ts, 'tustin');
|
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');
|
||||||
|
|
||||||
%% IFF Controller
|
%% IFF Controller
|
||||||
Kiff = -1/(s + 2*pi*2);
|
Kiff = 1/(s + 2*pi*2);
|
||||||
Kiff = c2d(Kiff, Ts, 'tustin');
|
Kiff = c2d(Kiff, Ts, 'tustin');
|
||||||
|
|
||||||
%% Excitation Signal
|
%% Excitation Signal
|
||||||
Tsim = 180; % Excitation time + Measurement time [s]
|
Tsim = 180; % Excitation time + Measurement time [s]
|
||||||
|
|
||||||
t = 0:Ts:Tsim;
|
t = 0:Ts:Tsim;
|
||||||
u_exc = timeseries(chirp(t, 0.1, Tsim, 1e3, 'logarithmic'), t);
|
% u_exc = timeseries(chirp(t, 0.1, Tsim, 1e3, 'logarithmic'), t);
|
||||||
|
u_exc = timeseries(chirp(t, 40, Tsim, 400, 'logarithmic'), t);
|
||||||
|
Loading…
Reference in New Issue
Block a user