Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

MWCMGController Class Reference

#include <MWCMGController.h>

Inheritance diagram for MWCMGController:

Inheritance graph
[legend]
Collaboration diagram for MWCMGController:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MWCMGController ()
 Constructors.
 MWCMGController (Whorl *ptr_whorl)
virtual ~MWCMGController ()
 Destructor.
int Run ()
int Initialize ()
double * tlu (double curtime)
int LoadLUT (char *filename)
int SetWheelTorque (Vector ControlTorque)
 Mutators Set the torque produced by the momentum wheels.
int SetThrusterTorque (char Thruster_set, int Number_of_Pulses, double Pulse_length)
 Sets the torque produced by the thrusters.
Matrix FindA ()
 Facilitators Determines the A matrix for the momentum wheels.
Matrix FindMOI_sw ()
 Determines the MOI of the momentum wheels.
void ReferenceModelSC (ssfTime deltaTime)
 Create a spacecraft reference model based on the quaternion kinematic equation and Euler Rotational Equation of Motion. The quaternion and angular rates are numerically integrated.
void ReferenceTrajectory (ssfTime deltaTime)
Vector Saturation (Vector _s, Vector _phi)
Vector Sign (Vector _s)
double SignSingle (double _s)
Vector WheelSaturation (Vector _u)
 Actuator Saturation function for the reaction wheels. Max toruqe is set with m_uMax.

Protected Attributes

Matrix m_gainMatrix
Vector m_controlTorque
Whorlm_whorl
 Member object in Controller Class.
Matrix A
 Member matrix in Controller Class that provides the orientation of the momentum wheels.
Matrix MOI_sw
 Member matrix in Controller Class that is a diagonal matrix with the MOI of the momentum wheels as its memebers.
Vector m_angularRateReference
 Member vector in Controller Class that is the angular rates of the reference model.
Vector m_angularAccelReference
 Member vector in Controller Class that is the angular acceleration of the reference model.
Vector m_quaternionReference
 Member vector in Controller Class that is the quaternion of the reference model.
Vector m_mrpReference
 Member vector in Controller Class that is the MRP's of the reference model.
double m_uMax
 Member double in Controller Class that is the max wheel control torque.

Private Attributes

timeval InitialTime
timeval RunTime
timeval CurrentTime
Vector MRPcurrent
Vector MRPRef
Vector omegaRef
Vector Qcurrent
Matrix RBR
Vector dMRP
Vector domega
double ** lut
double * myRow
double SIGMA

Constructor & Destructor Documentation

MWCMGController::MWCMGController  ) 
 

Constructors.

MWCMGController::MWCMGController Whorl ptr_whorl  )  [inline]
 

Definition at line 28 of file MWCMGController.h.

References Initialize().

virtual MWCMGController::~MWCMGController  )  [inline, virtual]
 

Destructor.

Definition at line 34 of file MWCMGController.h.


Member Function Documentation

Matrix Controller::FindA  )  [inherited]
 

Facilitators Determines the A matrix for the momentum wheels.

Definition at line 39 of file Controller.cpp.

References Whorl::GetMomentumWheel(), MomentumWheel::GetWheelAxis(), MomentumWheel::GetWheelCount(), Controller::m_whorl, O_SESSAME::Matrix, and O_SESSAME::Vector.

Referenced by Controller::Controller(), testController::Initialize(), slidingModeControlMRPMW::Initialize(), Initialize(), MRPTracking::Initialize(), DefaultController::Initialize(), and AngularRateController::Initialize().

Matrix Controller::FindMOI_sw  )  [inherited]
 

Determines the MOI of the momentum wheels.

Definition at line 63 of file Controller.cpp.

References MomentumWheel::GetAxialInertia(), Whorl::GetMomentumWheel(), MomentumWheel::GetWheelCount(), Controller::m_whorl, and O_SESSAME::Matrix.

Referenced by Controller::Controller(), testController::Initialize(), slidingModeControlMRPMW::Initialize(), Initialize(), MRPTracking::Initialize(), DefaultController::Initialize(), and AngularRateController::Initialize().

int MWCMGController::Initialize  )  [virtual]
 

Initializes the default controller

Implements Controller.

Definition at line 17 of file MWCMGController.cpp.

References Controller::FindA(), Controller::FindMOI_sw(), InitialTime, LoadLUT(), m_gainMatrix, and O_SESSAME::Matrix.

Referenced by MWCMGController().

int MWCMGController::LoadLUT char *  filename  ) 
 

Load the lookup table.

Definition at line 235 of file MWCMGController.cpp.

References lut.

Referenced by Initialize().

void Controller::ReferenceModelSC ssfTime  deltaTime  )  [inherited]
 

Create a spacecraft reference model based on the quaternion kinematic equation and Euler Rotational Equation of Motion. The quaternion and angular rates are numerically integrated.

Parameters:
deltaTime is a ssfTime variable that change in time of the reference model.

Definition at line 109 of file Controller.cpp.

References _, AttituteDynamics_QuaternionAngVel(), Whorl::GetMOI(), O_SESSAME::ssfTime::GetSeconds(), O_SESSAME::RungeKuttaIntegrator::Integrate(), Controller::m_angularAccelReference, Controller::m_angularRateReference, Controller::m_mrpReference, Controller::m_quaternionReference, Controller::m_whorl, O_SESSAME::Matrix, NullFunctor(), O_SESSAME::RungeKuttaIntegrator::SetNumSteps(), O_SESSAME::ModifiedRodriguezParameters::Switch(), and O_SESSAME::Vector.

void Controller::ReferenceTrajectory ssfTime  deltaTime  )  [inherited]
 

Definition at line 167 of file Controller.cpp.

References _, AttitudeTrajectory(), Whorl::GetMOI(), O_SESSAME::ssfTime::GetSeconds(), O_SESSAME::RungeKuttaIntegrator::Integrate(), Controller::m_angularAccelReference, Controller::m_angularRateReference, Controller::m_mrpReference, Controller::m_quaternionReference, Controller::m_whorl, O_SESSAME::Matrix, NullFunctor(), O_SESSAME::RungeKuttaIntegrator::SetNumSteps(), O_SESSAME::ModifiedRodriguezParameters::Switch(), and O_SESSAME::Vector.

Referenced by slidingModeControlMRPMW::Run(), MRPTracking::Run(), and AngularRateController::Run().

int MWCMGController::Run  )  [virtual]
 

Runs the default controller

Implements Controller.

Definition at line 39 of file MWCMGController.cpp.

References CurrentTime, dMRP, domega, Whorl::GetMOI(), Whorl::GetMomentumWheel(), Whorl::GetOmegaBL(), Whorl::GetQuaternion(), MomentumWheel::GetWheelSpeed(), InitialTime, m_controlTorque, O_SESSAME::Matrix, MRPcurrent, MRPRef, myRow, O_SESSAME::norm2(), omegaRef, Qcurrent, RBR, RunTime, Whorl::SetControl(), Controller::SetWheelTorque(), SIGMA, O_SESSAME::skew(), tlu(), and O_SESSAME::Vector.

Vector Controller::Saturation Vector  _s,
Vector  _phi
[inherited]
 

Definition at line 273 of file Controller.cpp.

References Controller::SignSingle(), and O_SESSAME::Vector.

Referenced by slidingModeControlMRPMW::Run().

int Controller::SetThrusterTorque char  Thruster_set,
int  Number_of_Pulses,
double  Pulse_length
[inherited]
 

Sets the torque produced by the thrusters.

Definition at line 104 of file Controller.cpp.

int Controller::SetWheelTorque Vector  ControlTorque  )  [inherited]
 

Mutators Set the torque produced by the momentum wheels.

Parameters:
ControlTorque a 3 x 1 vector representing the desired control torque in N-m

Definition at line 84 of file Controller.cpp.

References Whorl::GetMomentumWheel(), MomentumWheel::GetWheelCount(), Controller::m_whorl, MomentumWheel::SetWheelTorque(), and O_SESSAME::Vector.

Referenced by testController::Run(), slidingModeControlMRPMW::Run(), SingleAxisController::Run(), OpenLoopMWController::Run(), Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

Vector Controller::Sign Vector  _s  )  [inherited]
 

Definition at line 291 of file Controller.cpp.

References Controller::SignSingle(), and O_SESSAME::Vector.

double Controller::SignSingle double  _s  )  [inherited]
 

Definition at line 323 of file Controller.cpp.

Referenced by Controller::Saturation(), Controller::Sign(), and Controller::WheelSaturation().

double * MWCMGController::tlu double  curtime  ) 
 

Lookup a line in the lookup table.

Definition at line 192 of file MWCMGController.cpp.

References lut.

Referenced by Run().

Vector Controller::WheelSaturation Vector  _u  )  [inherited]
 

Actuator Saturation function for the reaction wheels. Max toruqe is set with m_uMax.

Parameters:
_u input control torque vector

Definition at line 303 of file Controller.cpp.

References Controller::m_uMax, Controller::SignSingle(), and O_SESSAME::Vector.

Referenced by testController::Run(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().


Member Data Documentation

Matrix Controller::A [protected, inherited]
 

Member matrix in Controller Class that provides the orientation of the momentum wheels.

Definition at line 102 of file Controller.h.

Referenced by Controller::Controller(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

struct timeval MWCMGController::CurrentTime [private]
 

Definition at line 57 of file MWCMGController.h.

Referenced by Run().

Vector MWCMGController::dMRP [private]
 

Definition at line 63 of file MWCMGController.h.

Referenced by Run().

Vector MWCMGController::domega [private]
 

Definition at line 64 of file MWCMGController.h.

Referenced by Run().

struct timeval MWCMGController::InitialTime [private]
 

Definition at line 55 of file MWCMGController.h.

Referenced by Initialize(), and Run().

double** MWCMGController::lut [private]
 

Definition at line 65 of file MWCMGController.h.

Referenced by LoadLUT(), and tlu().

Vector Controller::m_angularAccelReference [protected, inherited]
 

Member vector in Controller Class that is the angular acceleration of the reference model.

Definition at line 112 of file Controller.h.

Referenced by Controller::Controller(), Controller::ReferenceModelSC(), and Controller::ReferenceTrajectory().

Vector Controller::m_angularRateReference [protected, inherited]
 

Member vector in Controller Class that is the angular rates of the reference model.

Definition at line 109 of file Controller.h.

Referenced by Controller::Controller(), testController::Initialize(), slidingModeControlMRPMW::Initialize(), MRPTracking::Initialize(), DefaultController::Initialize(), AngularRateController::Initialize(), Controller::ReferenceModelSC(), and Controller::ReferenceTrajectory().

Vector MWCMGController::m_controlTorque [protected]
 

Definition at line 51 of file MWCMGController.h.

Referenced by Run().

Matrix MWCMGController::m_gainMatrix [protected]
 

Definition at line 50 of file MWCMGController.h.

Referenced by Initialize().

Vector Controller::m_mrpReference [protected, inherited]
 

Member vector in Controller Class that is the MRP's of the reference model.

Definition at line 118 of file Controller.h.

Referenced by Controller::Controller(), Controller::ReferenceModelSC(), and Controller::ReferenceTrajectory().

Vector Controller::m_quaternionReference [protected, inherited]
 

Member vector in Controller Class that is the quaternion of the reference model.

Definition at line 115 of file Controller.h.

Referenced by Controller::Controller(), testController::Initialize(), slidingModeControlMRPMW::Initialize(), MRPTracking::Initialize(), DefaultController::Initialize(), AngularRateController::Initialize(), Controller::ReferenceModelSC(), and Controller::ReferenceTrajectory().

double Controller::m_uMax [protected, inherited]
 

Member double in Controller Class that is the max wheel control torque.

Definition at line 121 of file Controller.h.

Referenced by Controller::WheelSaturation().

Whorl* Controller::m_whorl [protected, inherited]
 

Member object in Controller Class.

Definition at line 99 of file Controller.h.

Referenced by Controller::Controller(), Controller::FindA(), Controller::FindMOI_sw(), Controller::ReferenceModelSC(), Controller::ReferenceTrajectory(), and Controller::SetWheelTorque().

Matrix Controller::MOI_sw [protected, inherited]
 

Member matrix in Controller Class that is a diagonal matrix with the MOI of the momentum wheels as its memebers.

Definition at line 106 of file Controller.h.

Referenced by Controller::Controller(), slidingModeControlMRPMW::Run(), MRPTracking::Run(), DefaultController::Run(), and AngularRateController::Run().

Vector MWCMGController::MRPcurrent [private]
 

Definition at line 58 of file MWCMGController.h.

Referenced by Run().

Vector MWCMGController::MRPRef [private]
 

Definition at line 59 of file MWCMGController.h.

Referenced by Run().

double* MWCMGController::myRow [private]
 

Definition at line 66 of file MWCMGController.h.

Referenced by Run().

Vector MWCMGController::omegaRef [private]
 

Definition at line 60 of file MWCMGController.h.

Referenced by Run().

Vector MWCMGController::Qcurrent [private]
 

Definition at line 61 of file MWCMGController.h.

Referenced by Run().

Matrix MWCMGController::RBR [private]
 

Definition at line 62 of file MWCMGController.h.

Referenced by Run().

struct timeval MWCMGController::RunTime [private]
 

Definition at line 56 of file MWCMGController.h.

Referenced by Run().

double MWCMGController::SIGMA [private]
 

Definition at line 67 of file MWCMGController.h.

Referenced by Run().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 12:54:41 2007 for DSACSS Operational Code by  doxygen 1.3.9.1