[WIP] Change inputs.mat elements
Create new identification simulink
This commit is contained in:
@@ -11,21 +11,27 @@ options = linearizeOptions;
|
||||
options.SampleTime = 0;
|
||||
|
||||
%% Name of the Simulink File
|
||||
mdl = 'sim_micro_station';
|
||||
mdl = 'simscape_id_micro_station';
|
||||
|
||||
%% Micro-Hexapod
|
||||
% Input/Output definition
|
||||
io(1) = linio([mdl, '/Micro-Station/Fm_ext'],1,'openinput');
|
||||
io(2) = linio([mdl, '/Micro-Station/Fg_ext'],1,'openinput');
|
||||
io(3) = linio([mdl, '/Micro-Station/Dm_inertial'],1,'output');
|
||||
io(4) = linio([mdl, '/Micro-Station/Dg_inertial'],1,'output');
|
||||
io(4) = linio([mdl, '/Micro-Station/Ty_inertial'],1,'output');
|
||||
io(5) = linio([mdl, '/Micro-Station/Ry_inertial'],1,'output');
|
||||
io(6) = linio([mdl, '/Micro-Station/Dg_inertial'],1,'output');
|
||||
|
||||
% Run the linearization
|
||||
G_ms = linearize(mdl, io, 0);
|
||||
|
||||
% Input/Output names
|
||||
G_ms.InputName = {'Fmx', 'Fmy', 'Fmz', 'Fgx', 'Fgy', 'Fgz'};
|
||||
G_ms.OutputName = {'Dmx', 'Dmy', 'Dmz', 'Dgx', 'Dgy', 'Dgz'};
|
||||
G_ms.InputName = {'Fmx', 'Fmy', 'Fmz',...
|
||||
'Fgx', 'Fgy', 'Fgz'};
|
||||
G_ms.OutputName = {'Dmx', 'Dmy', 'Dmz', ...
|
||||
'Tyx', 'Tyy', 'Tyz', ...
|
||||
'Ryx', 'Ryy', 'Ryz', ...
|
||||
'Dgx', 'Dgy', 'Dgz'};
|
||||
|
||||
%% Save the obtained transfer functions
|
||||
save('./mat/id_micro_station.mat', 'G_ms');
|
||||
|
@@ -23,7 +23,7 @@ figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_ms('Dgz', 'Fgz'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_ms('Dgx', 'Fgx'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(meas_sys('Dmx', 'Fmx'), freqs, 'Hz'))), '.');
|
||||
set(gca,'xscale','log'); set(gca,'yscale','log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
@@ -50,7 +50,7 @@ figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_ms('Dmz', 'Fmz'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_ms('Dmx', 'Fmx'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(meas_sys('Dhx', 'Fhx'), freqs, 'Hz'))), '.');
|
||||
set(gca,'xscale','log'); set(gca,'yscale','log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
@@ -60,7 +60,7 @@ hold off;
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms('Dmz', 'Fmz'), freqs, 'Hz'))));
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms('Dmx', 'Fmx'), freqs, 'Hz'))));
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(meas_sys('Dhx', 'Fhx'), freqs, 'Hz'))), '.');
|
||||
set(gca,'xscale','log');
|
||||
ylim([-180, 180]);
|
||||
@@ -77,7 +77,7 @@ figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_ms('Dmz', 'Fgz'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_ms('Dmx', 'Fgx'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(meas_sys('Dhx', 'Fmx'), freqs, 'Hz'))), '.');
|
||||
set(gca,'xscale','log'); set(gca,'yscale','log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
@@ -87,7 +87,7 @@ hold off;
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms('Dmz', 'Fgz'), freqs, 'Hz'))));
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_ms('Dmx', 'Fgx'), freqs, 'Hz'))));
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(meas_sys('Dhx', 'Fmx'), freqs, 'Hz'))), '.');
|
||||
set(gca,'xscale','log');
|
||||
ylim([-180, 180]);
|
||||
|
Binary file not shown.
BIN
identification/simscape_id_micro_station.slx
Normal file
BIN
identification/simscape_id_micro_station.slx
Normal file
Binary file not shown.
Reference in New Issue
Block a user