Spacecraft Control Framework 1.0
Spacecraft Control Library
Public Member Functions | Public Attributes | List of all members
PD Class Reference

#include <sc_pd.h>

Public Member Functions

 PD (void)
 Constructor.
 
void Initialize (double a, double b, double c, double d, ml_matrix inertia)
 Initialize all state matrices. More...
 
ml_matrix Update (ml_matrix angle_error)
 Update the output. More...
 
void Reset (void)
 Reset the pd.
 
void SetInertia (ml_matrix inertia)
 Set the inertia.
 
ml_matrix GetInertia (void)
 Get the inertia.
 

Public Attributes

ml_matrix q_desired_state
 Target quaternion.
 

Detailed Description

A PD Based n axis controller for spacecraft.

Member Function Documentation

◆ Initialize()

void PD::Initialize ( double  a,
double  b,
double  c,
double  d,
ml_matrix  inertia 
)

Initialize all state matrices.

Initialize the class with the discrete controller gains (state space format).

Parameters
aGain matrix A
bGain matrix B
cGain matrix C
dGain matrix D
inrAxis inertias 1xn

References Reset().

◆ Update()

ml_matrix PD::Update ( ml_matrix  angle_error)

Update the output.

Update the controller.

Parameters
angleCurrent angles (nx1)
Returns
Torque demand (3x1)