#include <stewart.h>
Definition at line 143 of file stewart.h.
Public Member Functions | |
| Stewart () | |
| Default Constructor. | |
| Stewart (const Matrix InitPlat, bool Joint=true) | |
| Constructor. | |
| Stewart (const Stewart &x) | |
| Copy Constructor. | |
| Stewart (const std::string &filename, const std::string &PlatformName) | |
| ~Stewart () | |
| Destructor. | |
| const Stewart & | operator= (const Stewart &x) |
| void | set_Joint (const bool _Joint) |
| Set the position of the universal joint on the links. | |
| void | set_q (const ColumnVector _q) |
| Set the position of the platform. | |
| void | set_dq (const ColumnVector _dq) |
| Set the platform's speed. | |
| void | set_ddq (const ColumnVector _ddq) |
| Set the platform's acceleration. | |
| void | set_pR (const ColumnVector _pR) |
| Set the position of the center of mass of the platform. | |
| void | set_pIp (const Matrix _pIp) |
| Set the inertia matrix of the platform. | |
| void | set_mp (const Real _mp) |
| Set the mass of the platform. | |
| bool | get_Joint () const |
| Return the position of the universal joint (true if at base, false if at platform). | |
| ReturnMatrix | get_q () const |
| Return the position of the platform. | |
| ReturnMatrix | get_dq () const |
| Return the speed of the platform. | |
| ReturnMatrix | get_ddq () const |
| Return the acceleration of the platform. | |
| ReturnMatrix | get_pR () const |
| Return the postion of the center of mass of the platfom. | |
| ReturnMatrix | get_pIp () const |
| Return the inertia matrix of the platform. | |
| Real | get_mp () const |
| Return the mass of the platform. | |
| void | Transform () |
| Call the functions corresponding to the basic parameters when q changes. | |
| ReturnMatrix | Find_wRp () |
| Return the rotation matrix wRp. | |
| ReturnMatrix | Find_Omega () |
| Return the angular speed of the platform. | |
| ReturnMatrix | Find_Alpha () |
| Return the angular acceleration of the platform. | |
| ReturnMatrix | jacobian () |
| Return the jacobian matrix of the platform. | |
| ReturnMatrix | Find_InvJacob1 () |
| Return the first intermediate jacobian matrix (reverse) of the platform. | |
| ReturnMatrix | Find_InvJacob2 () |
| Return the second intermediate jacobian matrix (reverse) of the platform. | |
| ReturnMatrix | jacobian_dot () |
| Return time deriative of the inverse jacobian matrix of the platform. | |
| ReturnMatrix | Find_dl () |
| Return the extension rate of the links in a vector. | |
| ReturnMatrix | Find_ddl () |
| Return the extension acceleration of the links in a vector. | |
| ReturnMatrix | Find_C (const Real Gravity=GRAVITY) |
| Return intermediate matrix C for the dynamics calculations. | |
| ReturnMatrix | Torque (const Real Gravity=GRAVITY) |
| Return the torque vector of the platform. | |
| ReturnMatrix | JointSpaceForceVct (const Real Gravity=GRAVITY) |
| Return a vector containing the six actuation force components. | |
| ReturnMatrix | InvPosKine () |
| Return the lenght of the links in a vector. | |
| ReturnMatrix | ForwardKine (const ColumnVector guess_q, const ColumnVector l_given, const Real tolerance=0.001) |
| Return the position vector of the platform (vector q). | |
| ReturnMatrix | Find_h (const Real Gravity=GRAVITY) |
| Return the intermediate matrix corresponding to the Coriolis and centrifugal + gravity force/torque components. | |
| ReturnMatrix | Find_M () |
| Return the intermediate matrix corresponding to the inertia matrix of the machine. | |
| ReturnMatrix | ForwardDyn (const ColumnVector Torque, const Real Gravity=GRAVITY) |
| Return the acceleration vector of the platform (ddq). | |
| void | Find_Mc_Nc_Gc (Matrix &Mc, Matrix &Nc, Matrix &Gc) |
| Return(!) the intermediates matrix for forward dynamics with actuator dynamics. | |
| ReturnMatrix | ForwardDyn_AD (const ColumnVector Command, const Real t) |
| Return the acceleration of the platform (Stewart platform mechanism dynamics including actuator dynamics). | |
Public Attributes | |
| Matrix | wRp |
| Rotation matrix describing the orientation of the platform. | |
| Matrix | Jacobian |
| Jacobian matrix. | |
| Matrix | IJ1 |
| Inverse of the first intermediate Jacobian matrix. | |
| Matrix | IJ2 |
| Inverse of the second intermediate Jacobian matrix. | |
| ColumnVector | dl |
| Rate of expension vector. | |
| ColumnVector | ddl |
| Acceleration of expension vector. | |
| ColumnVector | Alpha |
| Angular speed of the platform. | |
| ColumnVector | Omega |
| Angular acceleration of the platform. | |
Private Attributes | |
| bool | UJointAtBase |
| Gives the position of the universal joint (true if at base, false if at platform). | |
| ColumnVector | q |
| Platform position (xyz + euler angles). | |
| ColumnVector | dq |
| Platform speed. | |
| ColumnVector | ddq |
| Platform acceleration. | |
| ColumnVector | pR |
| Platform center of mass (in its own referential). | |
| ColumnVector | gravity |
| Gravity vector. | |
| Matrix | pIp |
| Platform Inertia (local ref.). | |
| Real | mp |
| Platform mass. | |
| Real | p |
| Pitch of the ballscrew (links). | |
| Real | n |
| Gear ratio (links motor). | |
| Real | Js |
| Moment of inertia (ballscrew). | |
| Real | Jm |
| Moment of inertia (motor). | |
| Real | bs |
| Viscous damping coefficient of the ballscrew. | |
| Real | bm |
| Viscous damping coefficient of the motor. | |
| Real | Kb |
| Motor back EMF. | |
| Real | L |
| Motor Inductance. | |
| Real | R |
| Motor armature resistance. | |
| Real | Kt |
| Motor torque. | |
| LinkStewart | Links [6] |
| Platform links. | |
| Stewart::Stewart | ( | const Matrix | InitPlatt, | |
| bool | Joint = true | |||
| ) |
| void Stewart::Transform | ( | ) |
Call the functions corresponding to the basic parameters when q changes.
These functions are called by Transform:
Definition at line 1160 of file stewart.cpp.
References Find_InvJacob1(), Find_InvJacob2(), Find_wRp(), IJ1, IJ2, jacobian(), Jacobian, Links, q, and wRp.
Referenced by set_q().
| ReturnMatrix Stewart::Find_wRp | ( | ) |
Return the rotation matrix wRp.
Eq of the matrix:

Where:
are the three Euler angles of the platform. Definition at line 1186 of file stewart.cpp.
References q.
Referenced by Stewart(), and Transform().
| ReturnMatrix Stewart::Find_Omega | ( | ) |
| ReturnMatrix Stewart::Find_Alpha | ( | ) |
Return the angular acceleration of the platform.
Eq:

Where:
are the three Euler angles of the platform.
are the three Euler angle speed of the platform.
are the three Euler angle acceleration of the platform. Definition at line 1261 of file stewart.cpp.
Referenced by set_ddq().
| ReturnMatrix Stewart::jacobian | ( | ) |
Return the jacobian matrix of the platform.
Eq:

Where:
and
are intermediate matrix(Find_InvJacob1(), Find_InvJacob2()) Definition at line 1290 of file stewart.cpp.
Referenced by Transform().
| ReturnMatrix Stewart::Find_InvJacob1 | ( | ) |
Return the first intermediate jacobian matrix (reverse) of the platform.
Eq:

Where:
to
are the unit vector of the links
to
are the attachment point of the links to the platform in the world referential Definition at line 1316 of file stewart.cpp.
References Links, LinkStewart::UnitV, and wRp.
Referenced by JointSpaceForceVct(), and Transform().
| ReturnMatrix Stewart::Find_InvJacob2 | ( | ) |
Return the second intermediate jacobian matrix (reverse) of the platform.
Eq:

Where:
and
are two of the euler angle of the platform (vector q) Definition at line 1344 of file stewart.cpp.
References q.
Referenced by Transform().
| ReturnMatrix Stewart::jacobian_dot | ( | ) |
Return time deriative of the inverse jacobian matrix of the platform.
Eq:



Where:
is the angular speed vector of each link
is the angular speed vector of the platform
is the position vector of the attachment point of the link to the platform
and
are two of the Euler angle (vector q)
and
are two of the Euler angle speed (vector dq) Definition at line 1389 of file stewart.cpp.
References dl, dq, IJ1, IJ2, L, LinkStewart::L, Links, Omega, q, and LinkStewart::UnitV.
Referenced by Find_ddl(), and Find_Mc_Nc_Gc().
| ReturnMatrix Stewart::Find_dl | ( | ) |
Return the extension rate of the links in a vector.
Eq:

Where:
is the inverse Jacobian matrix of the platform
is the dq vector Definition at line 1451 of file stewart.cpp.
Referenced by set_dq().
| ReturnMatrix Stewart::Find_ddl | ( | ) |
Return the extension acceleration of the links in a vector.
Eq:

Where:
is the inverse jacobian matrix of the platform
is the ddq vector Definition at line 1472 of file stewart.cpp.
References ddq, dq, Jacobian, and jacobian_dot().
| ReturnMatrix Stewart::Find_C | ( | const Real | Gravity = GRAVITY |
) |
Return intermediate matrix C for the dynamics calculations.
Eqs:




Where:
is the acceleration of the platform center of mass.
is the acceleration of the platform center (first three elements of the ddq vector).
is the angular acceleration of the platform.
is the platform center of mass in the world referential.
is the angular speed of the platform.
is the rotational matrix of the two referentials (world and platform).
is the vector of the center of mass of the platform with reference to the local frame (platform).
is the constant mass moments of inertia of the platform with reference to the local frame (platform).
is the mass of the platform.
is the normal force transferred from the platform to the link.
is the constant mass moments of inertia of the platform in the world referential.
is the position of the attachment point of each link to the platform in the world referential.
is the moment transferred from the platform to the link (not present is the spherical joint is at the platform end). Definition at line 1512 of file stewart.cpp.
References Alpha, ddq, gravity, Links, LinkStewart::Moment(), mp, Omega, pIp, pR, UJointAtBase, and wRp.
Referenced by JointSpaceForceVct().
| ReturnMatrix Stewart::Torque | ( | const Real | Gravity = GRAVITY |
) |
Return the torque vector of the platform.
| Gravity,: | Gravity (9.81) |

Where:
is the Jacobian matrix of the platform.Definition at line 1625 of file stewart.cpp.
References ddl, dl, Jacobian, JointSpaceForceVct(), and Links.
Referenced by Find_h(), Find_M(), and stewartmain().
| ReturnMatrix Stewart::JointSpaceForceVct | ( | const Real | Gravity = GRAVITY |
) |
Return a vector containing the six actuation force components.
| Gravity,: | Gravity (9.81) |
Definition at line 1595 of file stewart.cpp.
References Find_C(), Find_InvJacob1(), IJ1, and Links.
Referenced by Torque().
| ReturnMatrix Stewart::InvPosKine | ( | ) |
Return the lenght of the links in a vector.
The goal of the inverse kinematic is to find the lenght of each of the six links from the position of the platform (X,Y,Z,
,
,
).
Definition at line 1429 of file stewart.cpp.
Referenced by stewartmain().
| ReturnMatrix Stewart::ForwardKine | ( | const ColumnVector | guess_q, | |
| const ColumnVector | l_given, | |||
| const Real | tolerance = 0.001 | |||
| ) |
Return the position vector of the platform (vector q).
| guess_q,: | Approximation of real position | |
| l_given,: | Lenght of the 6 links | |
| tolerance,: | Ending criterion |
Eq:

Where:
is the position vector of the platform at the ith iteration.
is the position vector of the platform at the (i-1)th iteration.
is the Jacobian matrix of the platform at the position of the
vector.
is the lenght vector of the links at the (i-1)th position of the platform.Definition at line 1567 of file stewart.cpp.
References Jacobian, L, Links, q, and set_q().
Referenced by stewartmain().
| ReturnMatrix Stewart::Find_h | ( | const Real | Gravity = GRAVITY |
) |
Return the intermediate matrix corresponding to the Coriolis and centrifugal + gravity force/torque components.
| Gravity,: | Gravity (9.81) |
Definition at line 1646 of file stewart.cpp.
References set_ddq(), and Torque().
Referenced by Find_Mc_Nc_Gc(), and ForwardDyn().
| ReturnMatrix Stewart::Find_M | ( | ) |
Return the intermediate matrix corresponding to the inertia matrix of the machine.
M is found by setting the dq and Gravity vectors to zero and the ddq vector to zero except for the ith element that is set to one. Then, the ith row of M is equal to the matrix returned by Torque().
Definition at line 1663 of file stewart.cpp.
References dq, set_ddq(), set_dq(), and Torque().
Referenced by Find_Mc_Nc_Gc(), and ForwardDyn().
| ReturnMatrix Stewart::ForwardDyn | ( | const ColumnVector | T, | |
| const Real | Gravity = GRAVITY | |||
| ) |
Return the acceleration vector of the platform (ddq).
| T,: | torque vector | |
| Gravity,: | Gravity (9.81) |

Where:
Definition at line 1701 of file stewart.cpp.
References Find_h(), and Find_M().
Referenced by stewartmain().
| void Stewart::Find_Mc_Nc_Gc | ( | Matrix & | Mc, | |
| Matrix & | Nc, | |||
| Matrix & | Gc | |||
| ) |
Return(!) the intermediates matrix for forward dynamics with actuator dynamics.
| Mc,: | Inertia matrix of the machine | |
| Nc,: | Coriolis and centrifugal force/torque component | |
| Gc,: | Gravity force/torque component |
Where:
is the Identity matrix.
is the mass moment of inertia of the ballscrew.
is the mass moment of inertia of the motor.
is the viscous damping coefficient of the ballscrew.
is the viscous damping coefficient of the motor.Definition at line 1736 of file stewart.cpp.
References bm, bs, dq, Find_h(), Find_M(), Jacobian, jacobian_dot(), Jm, Js, M_PI, n, p, and set_dq().
Referenced by ForwardDyn_AD().
| ReturnMatrix Stewart::ForwardDyn_AD | ( | const ColumnVector | Command, | |
| const Real | t | |||
| ) |
Return the acceleration of the platform (Stewart platform mechanism dynamics including actuator dynamics).
| Command,: | Vector of the 6 motors voltages. | |
| t,: | period of time use to find the currents (di/dt) |

Currents:

Motor torque:

Platform acceleration:

Where:
is the dq vector.
is the motor back emf constant.
is the motor torque constant.
,
and
are from Find_Mc_Nc_Gc(). Definition at line 1792 of file stewart.cpp.
References dq, Find_Mc_Nc_Gc(), Jacobian, Kb, Kt, L, M_PI, p, and R.
Referenced by stewartmain().
1.5.1