Robotran C Documentation
Macros | Functions
user_LinkForces_deriv.c File Reference

Definition of the derivative of the user link forces laws. More...

#include "math.h"
#include "mbs_data.h"

Macros

#define _USE_MATH_DEFINES
 

Functions

double user_LinkForces_dq (double Z, double d_Z, double Zd, double d_Zd, MbsData *mbs_data, double tsim, int i_link, int ixJ)
 Compute the partial derivative of a link forces with respect to a generalized coordinate. More...
 
double user_LinkForces_dqd (double Z, double d_Z, double Zd, double d_Zd, MbsData *mbs_data, double tsim, int i_link, int ixJ)
 Compute the partial derivative of a link forces with respect to a generalized velocity. More...
 
double user_LinkForces_dqdd (double Z, double d_Z, double Zd, double d_Zd, MbsData *mbs_data, double tsim, int i_link, int ixJ)
 Compute the partial derivative of a link forces with respect to a generalized acceleration. More...
 
double user_LinkForces_dp (double Z, double d_Z, double Zd, double d_Zd, MbsData *mbs_data, double tsim, int i_link)
 Compute the partial derivative of a link forces with respect to a specific parameter. More...
 

Detailed Description

Definition of the derivative of the user link forces laws.

Creation date: October 2020

Author
Robotran Team

(c) Universite catholique de Louvain

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Function Documentation

◆ user_LinkForces_dp()

double user_LinkForces_dp ( double  Z,
double  d_Z,
double  Zd,
double  d_Zd,
MbsData mbs_data,
double  tsim,
int  i_link 
)

Compute the partial derivative of a link forces with respect to a specific parameter.

Parameters
[in]Zthe distance (>0) between the extremities of the link force.
[in]d_Zthe partial derivative of Z with respect to the parameter i_param: $d\_Z = \frac{\partial Z}{\partial i\_param}$.
[in]Zdthe relative velocity between the extremities of the link force, negative if the points get closer.
[in]d_Zdthe partial derivative of Zd with respect to the parameter i_param: $d\_Zd = \frac{\partial Zd}{\partial i\_param}$.
[in]mbs_datathe MbsData structure of the model.
[in]tsimthe current time of the simulation.
[in]i_linkthe ID identifying the computed link force.
Returns
The partial derivative of the link force with respect to the parameter i_param:

\[d\_Flink_{i\_link} = \frac{\partial Flink_{i\_link}}{\partial i\_param}\]

.

◆ user_LinkForces_dq()

double user_LinkForces_dq ( double  Z,
double  d_Z,
double  Zd,
double  d_Zd,
MbsData mbs_data,
double  tsim,
int  i_link,
int  i_param 
)

Compute the partial derivative of a link forces with respect to a generalized coordinate.

Parameters
[in]Zthe distance (>0) between the extremities of the link force.
[in]d_Zthe partial derivative of Z with respect to generalized coordinate of joint i_joint: $d\_Z = \frac{\partial Z}{\partial q_{i\_joint}}$.
[in]Zdthe relative velocity between the extremities of the link force, negative if the points get closer.
[in]d_Zdthe partial derivative of Zd with respect to generalized coordinate of joint i_joint: $d\_Zd = \frac{\partial Zd}{\partial q_{i\_joint}}$.
[in]mbs_datathe MbsData structure of the model.
[in]tsimthe current time of the simulation.
[in]i_linkthe ID identifying the computed link force.
[in]i_paramthe ID identifying the current joint the derivative is computed for. This parameter should bun unused.
Returns
The partial derivative of the link force with respect to generalized coordinate i_joint:

\[d\_Flink_{i\_link} = \frac{\partial Flink_{i\_link}}{\partial q_{i\_joint}}\]

.

◆ user_LinkForces_dqd()

double user_LinkForces_dqd ( double  Z,
double  d_Z,
double  Zd,
double  d_Zd,
MbsData mbs_data,
double  tsim,
int  i_link,
int  i_param 
)

Compute the partial derivative of a link forces with respect to a generalized velocity.

Parameters
[in]Zthe distance (>0) between the extremities of the link force.
[in]d_Zthe partial derivative of Z with respect to generalized velocity of joint i_joint: $d\_Z = \frac{\partial Z}{\partial \dot{q}_{i\_joint}}$.
[in]Zdthe relative velocity between the extremities of the link force, negative if the points get closer.
[in]d_Zdthe partial derivative of Zd with respect to generalized velocity of joint i_joint: $d\_Zd = \frac{\partial Zd}{\partial \dot{q}_{i\_joint}}$.
[in]mbs_datathe MbsData structure of the model.
[in]tsimthe current time of the simulation.
[in]i_linkthe ID identifying the computed link force.
[in]i_paramthe ID identifying the current joint the derivative is computed for. This parameter should bun unused.
Returns
The partial derivative of the link force with respect to generalized velocity i_joint:

\[d\_Flink_{i\_link} = \frac{\partial Flink_{i\_link}}{\partial \dot{q}_{i\_joint}}\]

.

◆ user_LinkForces_dqdd()

double user_LinkForces_dqdd ( double  Z,
double  d_Z,
double  Zd,
double  d_Zd,
MbsData mbs_data,
double  tsim,
int  i_link,
int  i_param 
)

Compute the partial derivative of a link forces with respect to a generalized acceleration.

Parameters
[in]Zthe distance (>0) between the extremities of the link force.
[in]d_Zthe partial derivative of Z with respect to generalized velocity of joint i_joint: $d\_Z = \frac{\partial Z}{\partial \dot{q}_{i\_joint}}$.
[in]Zdthe relative velocity between the extremities of the link force, negative if the points get closer.
[in]d_Zdthe partial derivative of Zd with respect to generalized velocity of joint i_joint: $d\_Zd = \frac{\partial Zd}{\partial \dot{q}_{i\_joint}}$.
[in]mbs_datathe MbsData structure of the model.
[in]tsimthe current time of the simulation.
[in]i_linkthe ID identifying the computed link force.
[in]i_paramthe ID identifying the current joint the derivative is computed for. This parameter should bun unused.
Returns
The partial derivative of the link force with respect to generalized acceleration i_joint:

\[d\_Flink_{i\_link} = \frac{\partial Flink_{i\_link}}{\partial \ddot{q}_{i\_joint}}\]

.