2018-06-21 11:44:23 +02:00
|
|
|
%% Open Loop simulation and save the final state
|
|
|
|
steady_time = 10;
|
|
|
|
|
|
|
|
initializeSimConf(struct('Tsim', steady_time, 'cl_time', steady_time));
|
|
|
|
|
|
|
|
set_param('Assemblage',...
|
|
|
|
'SaveFinalState','on',...
|
|
|
|
'FinalStateName','myOperPoint',...
|
|
|
|
'SaveCompleteFinalSimState','on'...
|
|
|
|
);
|
|
|
|
|
2018-10-02 21:33:56 +02:00
|
|
|
sim('Assemblage');
|
2018-06-21 11:44:23 +02:00
|
|
|
|
|
|
|
save('./data/myOperPoint.mat', 'myOperPoint');
|
|
|
|
|
|
|
|
set_param('Assemblage',...
|
|
|
|
'SaveFinalState','off',...
|
|
|
|
'SaveCompleteFinalSimState','off'...
|
|
|
|
);
|
|
|
|
|
|
|
|
save('./data/exp_open_loop.mat', 'Dmeas');
|
|
|
|
|
|
|
|
%% Close the Loop and start from steady state
|
|
|
|
sim_time = 10;
|
|
|
|
|
|
|
|
initializeSimConf(struct('Tsim', steady_time+sim_time, 'cl_time', steady_time));
|
|
|
|
|
|
|
|
load('./data/myOperPoint.mat', 'myOperPoint');
|
|
|
|
|
|
|
|
set_param('Assemblage',...
|
|
|
|
'LoadInitialState','on',...
|
|
|
|
'InitialState','myOperPoint'...
|
|
|
|
);
|
|
|
|
|
2018-10-02 21:33:56 +02:00
|
|
|
sim('Assemblage');
|
2018-06-21 11:44:23 +02:00
|
|
|
|
|
|
|
set_param('Assemblage',...
|
|
|
|
'LoadInitialState','off' ...
|
|
|
|
);
|
|
|
|
|
|
|
|
save('./data/exp_close_loop_xyz.mat', 'Dmeas');
|