Robotran C Documentation
mbs_linearipk.h
Go to the documentation of this file.
1 //---------------------------
2 // UCL-CEREM-MBS
3 //
4 // @version MBsysLab_s 1.7.a
5 //
6 // Creation : 2006
7 // Last update : 01/10/2008
8 //---------------------------
9 
10 #ifndef mbs_linearipk_h
11 #define mbs_linearipk_h
12 /*--------------------*/
13 
14 #include "mbs_linearipk_struct.h"
15 #include "mbs_data.h"
16 #include "mbs_aux.h"
17 #include "useful_functions.h"
18 #include "MBSfun.h"
19 
29 MbsLpk* mbs_new_lpk(MbsData *s, int nx, int nF);
30 
51 int mbs_lineari_fct(double *x, double *Fx, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice);
52 
68 int mbs_linearipk(double **GK, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice);
69 
75 void mbs_delete_lpk(MbsLpk *lpk);
76 
77 /*--------------------*/
78 #endif
mbs_Rred
int mbs_Rred(MbsAux *mbs_aux, MbsData *s)
compute Rred, the reduced equations of motions on a residual form [nqu x 1] obtained after the 2 cons...
Definition: mbs_Rred.c:20
mbs_linearipk.h
MbsLpk::qd_saved
double * qd_saved
qd saved configuration
Definition: mbs_linearipk_struct.h:26
_MBS_ERR_MOD_SPEC_17
#define _MBS_ERR_MOD_SPEC_17
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:198
mbs_lineari_fct
int mbs_lineari_fct(double *x, double *Fx, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice)
compute the Fx vector for a given vector x.
Definition: mbs_linearipk.c:269
MbsLpk::absincr_max
double absincr_max
Maximum increment value of variables, set to 0.0 to disable it [default = 0.0].
Definition: mbs_linearipk_struct.h:52
MbsData::qd
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
MbsLpk::q_saved
double * q_saved
q saved configuration (because lienaripk uses the mbs_data structure in the process)
Definition: mbs_linearipk_struct.h:25
mbs_new_lpk
MbsLpk * mbs_new_lpk(MbsData *s, int nx, int nF)
create a new lpk structure that is used to compute the linearized matrices Gr and Kr.
Definition: mbs_linearipk.c:344
MbsLpk::F_star
double * F_star
force vector for the reference configuration.
Definition: mbs_linearipk_struct.h:40
useful_functions.h
MbsLpk::relincr
double relincr
options for the lpk linearization [default = 1e-2]
Definition: mbs_linearipk_struct.h:50
mbs_data.h
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
MbsLpk
Definition: mbs_linearipk_struct.h:19
MbsLpk::n_diverge
int n_diverge
Definition: mbs_linearipk_struct.h:22
get_dvec_0
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:880
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
mbs_project_interface.h
_MBS_ERR_MID_UXD
#define _MBS_ERR_MID_UXD
Mid Level error number Related to uxd, i.e.
Definition: mbs_errors_names.h:82
MbsLpk::maxcomp
double maxcomp
Definition: mbs_linearipk_struct.h:23
free_dmat_0
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
mbs_new_lpk
MbsLpk * mbs_new_lpk(MbsData *s, int nx, int nF)
create a new lpk structure that is used to compute the linearized matrices Gr and Kr.
Definition: mbs_linearipk.c:344
MbsData::Nux
int Nux
Number of user variable.
Definition: mbs_data.h:288
user_Derivative
void user_Derivative(MbsData *mbs_data)
Definition: user_Derivative.c:15
_MBS_ERR_LOW_NAN
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:142
MbsLpk::x_ptr
double ** x_ptr
vector of pointers pointing to the linearized variables
Definition: mbs_linearipk_struct.h:34
MBSfun.h
get_dmat_0
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0
Definition: mbs_matrix.c:238
mbs_linearipk_struct.h
mbs_linearipk
int mbs_linearipk(double **GK, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice)
compute the linearized damping matrix Gr or stiffness matrix Kr for a given configuration (q,...
Definition: mbs_linearipk.c:20
mbs_delete_lpk
void mbs_delete_lpk(MbsLpk *lpk)
free memory of the lpk structure.
Definition: mbs_linearipk.c:393
MbsLpk::absincr
double absincr
Minimum increment value of variables [default = 1e-3].
Definition: mbs_linearipk_struct.h:51
MbsLpk::GK_prem
double ** GK_prem
Definition: mbs_linearipk_struct.h:44
MbsData::flag_safety_checks
int flag_safety_checks
Flag to activate safety checks everywhere in mbsysc core. Faster computation if this flag is put to 0...
Definition: mbs_data.h:307
mbs_msg
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
MbsLpk::F_mid
double * F_mid
force vector for the middle configuration.
Definition: mbs_linearipk_struct.h:41
MbsLpk::itermax
int itermax
options for the lpk linearization [default = 10]
Definition: mbs_linearipk_struct.h:49
MbsData::Qq
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:204
MbsData::q
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
externalmbs::increment
subroutine, public increment(tbegin)
Increment time step and save the current configuration of all mbs.
Definition: mod_external_robotran.f90:203
MbsLpk::x_mid
double * x_mid
middle configuration (for parabolic fitting iteration)
Definition: mbs_linearipk_struct.h:37
mbs_linearipk
int mbs_linearipk(double **GK, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice)
compute the linearized damping matrix Gr or stiffness matrix Kr for a given configuration (q,...
Definition: mbs_linearipk.c:20
_MBS_ERR_MOD_SPEC_16
#define _MBS_ERR_MOD_SPEC_16
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:192
MbsLpk::x_star
double * x_star
reference configuration (for the modal analysis, typically an equilibrium configuration)
Definition: mbs_linearipk_struct.h:36
MbsLpk::F_ext
double * F_ext
force vector for the extreme configuration.
Definition: mbs_linearipk_struct.h:42
MbsLpk::diverge_ind
int * diverge_ind
Definition: mbs_linearipk_struct.h:21
mbs_message.h
MbsLpk::x_ext
double * x_ext
extreme configuration (for parabolic fitting iteration)
Definition: mbs_linearipk_struct.h:38
MbsLpk::Qq_saved
double * Qq_saved
Qq saved configuration.
Definition: mbs_linearipk_struct.h:28
MbsLpk::qdd_saved
double * qdd_saved
qdd saved configuration (because mbs_data-qdd is modified in the dirdynared call)
Definition: mbs_linearipk_struct.h:27
get_ivec_0
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:399
MbsData
Definition: mbs_data.h:149
_MBS_ERR_MOD_SPEC_11
#define _MBS_ERR_MOD_SPEC_11
Mid Level error number Module specific errors range from -11 to -19 please read the error message...
Definition: mbs_errors_names.h:162
MbsLpk::verbose
int verbose
Definition: mbs_linearipk_struct.h:47
MbsLpk::GK_comp
double ** GK_comp
Definition: mbs_linearipk_struct.h:45
mbs_delete_lpk
void mbs_delete_lpk(MbsLpk *lpk)
free memory of the lpk structure.
Definition: mbs_linearipk.c:393
MbsLpk::equitol
double equitol
options for the lpk linearization [default = 1e-6]
Definition: mbs_linearipk_struct.h:53
sign
static double sign(double a, double b)
Definition: dopri5.c:77
mbs_lineari_fct
int mbs_lineari_fct(double *x, double *Fx, MbsLpk *lpk, MbsAux *aux, MbsData *s, int EqChoice)
compute the Fx vector for a given vector x.
Definition: mbs_linearipk.c:269
MbsLpk::ux_saved
double * ux_saved
ux saved confguration
Definition: mbs_linearipk_struct.h:29
copy_dvec_0
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:906
MbsData::uxd
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:286
MbsLpk::lintol
double lintol
options for the lpk linearization [default = 1e-3]
Definition: mbs_linearipk_struct.h:54
user_equil_fxe
void user_equil_fxe(MbsData *mbs_data, double *f)
user own implementation of added equilibrium equations Fxe Necessary to express equilibrium f(x)=0
Definition: user_equil.c:65
MAX
#define MAX(a, b)
Definition: useful_functions.h:14
MbsData::qdd
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
MbsLpk::nF
int nF
nF=nqu or nF=nqu+nux (working variable)
Definition: mbs_linearipk_struct.h:32
MbsData::ux
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:285
mbs_aux.h
MbsLpk::nx
int nx
nx=nqu or nux (working variable)
Definition: mbs_linearipk_struct.h:31
mbs_errors_names.h