Public Member Functions | Private Attributes | List of all members
Proportional_Derivative Class Reference

Proportional derivative controller class. More...

#include <controller.h>

Public Member Functions

 Proportional_Derivative (const short dof=1)
 Constructor. More...
 
 Proportional_Derivative (const Robot_basic &robot, const DiagonalMatrix &Kp, const DiagonalMatrix &Kd)
 Constructor. More...
 
short set_Kd (const DiagonalMatrix &Kd)
 Assign the velocity error gain matrix $K_p(i,i)$. More...
 
short set_Kp (const DiagonalMatrix &Kp)
 Assign the position error gain matrix $K_p(i,i)$. More...
 
ReturnMatrix torque_cmd (Robot_basic &robot, const ColumnVector &qd, const ColumnVector &qpd)
 Output torque. More...
 

Private Attributes

int dof
 Degree of freedom. More...
 
DiagonalMatrix Kd
 Velocity error gain. More...
 
DiagonalMatrix Kp
 Position error gain. More...
 
ColumnVector q
 Robot joints positions. More...
 
ColumnVector qp
 Robot joints velocity. More...
 
ColumnVector qpp
 Robot joints acceleration. More...
 
ColumnVector tau
 Output torque. More...
 
ColumnVector zero3
 $3\times 1$ zero vector. More...
 

Detailed Description

Proportional derivative controller class.

The driving torques can be expressed as

\[ \tau = K_p(q_d-q) + K_d(\dot{q}_d-q) \]

where $K_p$, $K_d$ are diagonal positive definie matrix.

Definition at line 252 of file controller.h.

Constructor & Destructor Documentation

Proportional_Derivative::Proportional_Derivative ( const short  dof = 1)

Constructor.

Definition at line 609 of file controller.cpp.

Proportional_Derivative::Proportional_Derivative ( const Robot_basic robot,
const DiagonalMatrix Kp,
const DiagonalMatrix Kd 
)

Constructor.

Definition at line 618 of file controller.cpp.

Member Function Documentation

short Proportional_Derivative::set_Kd ( const DiagonalMatrix Kd_)

Assign the velocity error gain matrix $K_p(i,i)$.

Returns
short: 0 or WRONG_SIZE if the matrix is not $dof \times dof$.

Definition at line 657 of file controller.cpp.

short Proportional_Derivative::set_Kp ( const DiagonalMatrix Kp_)

Assign the position error gain matrix $K_p(i,i)$.

Returns
short: 0 or WRONG_SIZE if the matrix is not $dof \times dof$.

Definition at line 674 of file controller.cpp.

ReturnMatrix Proportional_Derivative::torque_cmd ( Robot_basic robot,
const ColumnVector qd,
const ColumnVector qpd 
)

Output torque.

Definition at line 632 of file controller.cpp.

Member Data Documentation

int Proportional_Derivative::dof
private

Degree of freedom.

Definition at line 263 of file controller.h.

DiagonalMatrix Proportional_Derivative::Kd
private

Velocity error gain.

Definition at line 269 of file controller.h.

DiagonalMatrix Proportional_Derivative::Kp
private

Position error gain.

Definition at line 269 of file controller.h.

ColumnVector Proportional_Derivative::q
private

Robot joints positions.

Definition at line 264 of file controller.h.

ColumnVector Proportional_Derivative::qp
private

Robot joints velocity.

Definition at line 264 of file controller.h.

ColumnVector Proportional_Derivative::qpp
private

Robot joints acceleration.

Definition at line 264 of file controller.h.

ColumnVector Proportional_Derivative::tau
private

Output torque.

Definition at line 264 of file controller.h.

ColumnVector Proportional_Derivative::zero3
private

$3\times 1$ zero vector.

Definition at line 264 of file controller.h.


The documentation for this class was generated from the following files:


kni
Author(s): Martin Günther
autogenerated on Fri Jun 7 2019 22:06:46