Inverse dynamics
Computation of the system inverse dynamics.
For more information, see Robotran theoritical framework.
Code sample
For running the inverse dynamics, insert the following code in your main script and adapt it to your need :
%--------------------------------------------------------------------------
MBS_user.process = 'invdyn';
opt.invdyn = {
'motion',
'trajectory',
'framerate',1000,...
'save2file','yes','renamefile','no','verbose','yes'};
% other options : 'time', 'visualize', 'clearmbsglobal' % Help about options on www.robotran.be
[mbs_invdyn,mbs_data] =
mbs_exe_invdyn(mbs_data,
opt.invdyn); % Inverse dynamics process
% Graphical Results
mycolor = ['r' 'b' 'g' 'k']; % Vector of color
figure(1)
hold on
plot(mbs_invdyn.
tsim,mbs_invdyn.
Qa(:,mbs_data.
qa(i)),mycolor(i)); % Actuator force/torque
time history
end
title('Force or torque XXX');
xlabel('
tsim'); ylabel('force [N] or torque [Nm]');
pause;
close(1);
Use
The inverse dynamics is performed by the function mbs_exe_invdyn().
The user specifies the desired options of the inverse dynamics in MBS_invdyn_opt structure. The results are provided in the MBS_invdyn structure.
The function calls successively :
See diagram below for more details :
inverse dynamics function diagram