|
Robotran C Documentation
|
Go to the documentation of this file.
10 #ifndef mbs_statespace_h
11 #define mbs_statespace_h
double ** Lr
Linearized stiff state matrix : d Rr / d ux.
Definition: mbs_statespace_struct.h:28
int mbs_compute_statespace(MbsSS *ss, MbsData *mbs_data)
Compute the matrices (A,B,C,D) for a mbs configuration (q,qd,qdd).
Definition: mbs_statespace.c:402
void mbs_print_statespace(MbsSS *ss)
Print the state-space structure.
Definition: mbs_statespace.c:585
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
void lubksb_0(double **a, int n, int *indx, double b[])
Definition: lubksb.c:31
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:175
int mbs_compute_statespace(MbsSS *ss, MbsData *mbs_data)
Compute the matrices (A,B,C,D) for a mbs configuration (q,qd,qdd).
Definition: mbs_statespace.c:402
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
Definition: mbs_linearipk_struct.h:19
double ** Mr
unused for the moment
Definition: mbs_statespace_struct.h:25
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
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
void mbs_delete_statespace(MbsSS *ss)
Free memory of the state-space structure.
Definition: mbs_statespace.c:542
void copy_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:363
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
int mbs_Mred(MbsAux *mbs_aux, MbsData *s)
compute Mr, the reduced mass matrix [nqu x nqu] obtained after the 2 consecutive reductions (Robotran...
Definition: mbs_Mred.c:19
void print_dmat_0(double **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:467
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
double ** Mr_copy
Definition: mbs_statespace_struct.h:48
int Nux
Number of user variable.
Definition: mbs_data.h:288
int Nux
Definition: mbs_statespace_struct.h:44
#define _MBS_ERR_MOD_SPEC_13
Generic error number Module specific errors range from -10 to -19 please read the error message a...
Definition: mbs_errors_names.h:174
void mbs_print_statespace(MbsSS *ss)
Print the state-space structure.
Definition: mbs_statespace.c:585
double ** x_ptr
vector of pointers pointing to the linearized variables
Definition: mbs_linearipk_struct.h:34
double ** B
input matrix [nx nu]
Definition: mbs_statespace_struct.h:20
int ludcmp_0(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 0.
Definition: ludcmp.c:82
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
int * iy
index of the state space representation output in the space space vector x. The vector is re-ordered ...
Definition: mbs_statespace_struct.h:13
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
int * get_ivec_1(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 1
Definition: mbs_1D_array.c:404
The State-space representation starts at index 0.
Definition: mbs_statespace_struct.h:10
int compute_JS
simple flag indicating whether the Jr,Jx and Sr matrices are computed to obtain the A matrix.
Definition: mbs_statespace_struct.h:40
int * iLU
Definition: mbs_statespace_struct.h:49
MbsSS * blank_new_statespace(int nx, int nu, int ny)
Allocate and intialize a statespace with almost fields to NULL.
Definition: mbs_statespace.c:146
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
double ** A
state space matrix [nx nx]
Definition: mbs_statespace_struct.h:19
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
MbsSS * blank_new_statespace(int nx, int nu, int ny)
Allocate and intialize a statespace with almost fields to NULL.
Definition: mbs_statespace.c:146
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
double * columnKr
Definition: mbs_statespace_struct.h:45
double ** Jr
Linearized Inertia matrix : d Rr / d qddu (including inerter terms)
Definition: mbs_statespace_struct.h:36
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
double ** Lx
Linearized ODE stiff state matrix : d uxd / d ux.
Definition: mbs_statespace_struct.h:34
double ** Kx
Linearized ODE stiffness matrix : d uxd / d qu.
Definition: mbs_statespace_struct.h:33
int ny
number of output (limited to 2*nqu)
Definition: mbs_statespace_struct.h:17
double ** Kr
Linearized stiffness matrix : d Rr / d qu.
Definition: mbs_statespace_struct.h:27
double * columnLr
Definition: mbs_statespace_struct.h:47
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
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
MbsSS * mbs_new_statespace(MbsData *s, int nu, int ny, int compute_uxd, int compute_JS)
Create a new structure state-space that contains the matrices (A,B,C,D).
Definition: mbs_statespace.c:18
void zeros_dvec_0(double *vec, int l_v)
set all the element of a [l_v sized] vector of doubles to zero, starting with index 0
Definition: mbs_1D_array.c:1343
double ** Sr
Linearized State derivativ matrix : d Rr / d uxd.
Definition: mbs_statespace_struct.h:38
Definition: mbs_data.h:149
double ** Jx
Linearized ODE Inertia matrix : d uxd / d qddu.
Definition: mbs_statespace_struct.h:37
MbsSS * mbs_new_statespace(MbsData *s, int nu, int ny, int compute_uxd, int compute_JS)
Create a new structure state-space that contains the matrices (A,B,C,D).
Definition: mbs_statespace.c:18
int verbose
Definition: mbs_linearipk_struct.h:47
double ** C
output matrix [ny nx]
Definition: mbs_statespace_struct.h:21
int nqu
Definition: mbs_statespace_struct.h:43
int * iu
index of the state space representation input in the Qq vector. The vector is re-ordered in the proce...
Definition: mbs_statespace_struct.h:12
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:420
double * N
Definition: mbs_statespace_struct.h:50
double ** Gx
Linearized ODE damping matrix : d uxd / d qdu.
Definition: mbs_statespace_struct.h:32
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
double ** D
Definition: mbs_statespace_struct.h:22
int find_ivec_1(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 1....
Definition: mbs_1D_array.c:832
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:286
int mbs_compute_linearMatrices(MbsSS *ss, MbsData *mbs_data, MbsLpk *lpk, MbsAux *aux)
Compute the linearized matrices necessary to obtain the (A,B,C) state-space representation.
Definition: mbs_statespace.c:207
double * columnGr
Definition: mbs_statespace_struct.h:46
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
double ** Gr
Linearized damping matrix : d Rr / d qdu.
Definition: mbs_statespace_struct.h:26
double ** Bvuc_0
copy of the Bvuc matrix (with index 0 !)
Definition: mbs_statespace_struct.h:30
int mbs_compute_linearMatrices(MbsSS *ss, MbsData *mbs_data, MbsLpk *lpk, MbsAux *aux)
Compute the linearized matrices necessary to obtain the (A,B,C) state-space representation.
Definition: mbs_statespace.c:207
int nF
nF=nqu or nF=nqu+nux (working variable)
Definition: mbs_linearipk_struct.h:32
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:285
void mbs_delete_statespace(MbsSS *ss)
Free memory of the state-space structure.
Definition: mbs_statespace.c:542
int nx
nx=nqu or nux (working variable)
Definition: mbs_linearipk_struct.h:31
int nu
number of input (limited to njoint for the moment as only joint forces are considered as input)
Definition: mbs_statespace_struct.h:16
int nx
number of state, (normally nx=2*nqu)
Definition: mbs_statespace_struct.h:15