Robotran Matlab Documentation

Equilibrium

Computation of the system equilibrium using an iterative Newton method.
For more information, see Robotran theoritical framework.

Code sample

For running the equilibrium, insert the following code in your main script and adapt it to your need :

%% 3. Equilibrium [mbs_exe_equil]
%--------------------------------------------------------------------------
MBS_user.process = 'equil';
opt.equil = {'solvemethod','fsolvepk',...
'relax',1.0,'itermax',30,'verbose','yes'};
% other options : 'smooth', 'xeqchoice', 'visualize', 'clearmbsglobal' % Help about options on www.robotran.be
% 'senstol', 'equitol', 'static'
[mbs_equil,mbs_data] = mbs_exe_equil(mbs_data,opt.equil); % Equilibrium process
% Equilibrium results
disp('Equilibrium results');
disp(['XXX1 = ', num2str(mbs_data.q(1))]); % Units : translation [m]
disp(['XXX2 = ', num2str(mbs_data.q(2))]); % rotation [rad]
%% Saving of the coordinate partitioning and of the equilibrium [mbs_save]
mbs_save(mbs_info,mbs_data); % Overwrite the original *.mbs (it is recommended to make a copy of the original *.mbs)
% Future equilibrium will be faster (only 1 check iteration)
mbs_data_ini = mbs_data; % Backup of the new multibody data structure

Use

The equilibrium is performed by the function mbs_exe_equil().

The user specifies the desired options of the direct dynamics in MBS_equil_opt structure. The results are provided in the MBS_equil structure.

The function calls successively :

See diagram below for more details :

equilibrium function diagram
mbs_save
function mbs_save(in varargin)
MBS_data::m
MBS_data m
Array containing the mass of each body.
Definition: Sdata_struct.m:48
MBS_dirdyn::opt
MBS_dirdyn opt
MBS_dirdyn_opt structure containing the direct dynamics options.
Definition: mbs_new_dirdyn.m:68
mbs_exe_equil
function mbs_exe_equil(in mymbs_data, in options)