#include <MRPTracking.h>
Inheritance diagram for MRPTracking:
Public Member Functions | |
MRPTracking () | |
Constructor. | |
MRPTracking (Whorl *ptr_whorl) | |
Constructor. | |
virtual | ~MRPTracking () |
Destructor. | |
int | Initialize () |
Initializes the default controller. | |
int | Run () |
Runs the MRP tracking controller, which is a Lyapunov based control law that tracks the attitude. | |
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 |
Member matrix value that is the angular rate Gain Matrix for the tracking control law. | |
double | m_mrpGain |
Member scalar value that is the MRP Gain for the tracking control law. | |
double | m_previousTime |
Member scalar value that keeps track of the previous time. Needed by reference model. | |
Vector | m_controlTorque |
Member value that is the control torque vector determined from control law. | |
Whorl * | m_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. |
|
Constructor.
Definition at line 16 of file MRPTracking.cpp. |
|
Constructor.
Definition at line 20 of file MRPTracking.cpp. References Initialize(). |
|
Destructor.
Definition at line 30 of file MRPTracking.cpp. |
|
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(), MWCMGController::Initialize(), Initialize(), DefaultController::Initialize(), and AngularRateController::Initialize(). |
|
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(), MWCMGController::Initialize(), Initialize(), DefaultController::Initialize(), and AngularRateController::Initialize(). |
|
Initializes the default controller.
Implements Controller. Definition at line 34 of file MRPTracking.cpp. References Controller::FindA(), Controller::FindMOI_sw(), Whorl::GetMOI(), O_SESSAME::ssfTime::GetSeconds(), CAMdoubleMatrix::initialize(), CAMdoubleVector::initialize(), Controller::m_angularRateReference, m_controlTorque, m_gainMatrix, m_mrpGain, m_previousTime, Controller::m_quaternionReference, and O_SESSAME::Matrix. Referenced by MRPTracking(). |
|
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.
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. |
|
|
Runs the MRP tracking controller, which is a Lyapunov based control law that tracks the attitude.
Implements Controller. Definition at line 75 of file MRPTracking.cpp. References Controller::A, O_SESSAME::Rotation::GetDCM(), Whorl::GetMOI(), Whorl::GetMomentumWheel(), Whorl::GetMRP(), Whorl::GetOmegaBL(), O_SESSAME::ssfTime::GetSeconds(), MomentumWheel::GetWheelSpeed(), m_controlTorque, m_mrpGain, O_SESSAME::Matrix, Controller::MOI_sw, Controller::ReferenceTrajectory(), Whorl::SetAngularRateError(), Whorl::SetControl(), Whorl::SetMRPError(), Whorl::SetReferenceOmegaBL(), Whorl::SetReferenceQuaternion(), Controller::SetWheelTorque(), O_SESSAME::skew(), O_SESSAME::ModifiedRodriguezParameters::Switch(), O_SESSAME::Vector, and Controller::WheelSaturation(). |
|
Definition at line 273 of file Controller.cpp. References Controller::SignSingle(), and O_SESSAME::Vector. Referenced by slidingModeControlMRPMW::Run(). |
|
Sets the torque produced by the thrusters.
Definition at line 104 of file Controller.cpp. |
|
Mutators Set the torque produced by the momentum wheels.
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(), MWCMGController::Run(), Run(), DefaultController::Run(), and AngularRateController::Run(). |
|
Definition at line 291 of file Controller.cpp. References Controller::SignSingle(), and O_SESSAME::Vector. |
|
Definition at line 323 of file Controller.cpp. Referenced by Controller::Saturation(), Controller::Sign(), and Controller::WheelSaturation(). |
|
Actuator Saturation function for the reaction wheels. Max toruqe is set with m_uMax.
Definition at line 303 of file Controller.cpp. References Controller::m_uMax, Controller::SignSingle(), and O_SESSAME::Vector. Referenced by testController::Run(), slidingModeControlMRPMW::Run(), Run(), DefaultController::Run(), and AngularRateController::Run(). |
|
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(), Run(), DefaultController::Run(), and AngularRateController::Run(). |
|
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(). |
|
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(), Initialize(), DefaultController::Initialize(), AngularRateController::Initialize(), Controller::ReferenceModelSC(), and Controller::ReferenceTrajectory(). |
|
Member value that is the control torque vector determined from control law.
Definition at line 56 of file MRPTracking.h. Referenced by Initialize(), and Run(). |
|
Member matrix value that is the angular rate Gain Matrix for the tracking control law.
Definition at line 46 of file MRPTracking.h. Referenced by Initialize(). |
|
Member scalar value that is the MRP Gain for the tracking control law.
Definition at line 49 of file MRPTracking.h. Referenced by Initialize(), and Run(). |
|
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(). |
|
Member scalar value that keeps track of the previous time. Needed by reference model.
Definition at line 52 of file MRPTracking.h. Referenced by Initialize(). |
|
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(), Initialize(), DefaultController::Initialize(), AngularRateController::Initialize(), Controller::ReferenceModelSC(), and Controller::ReferenceTrajectory(). |
|
Member double in Controller Class that is the max wheel control torque.
Definition at line 121 of file Controller.h. Referenced by Controller::WheelSaturation(). |
|
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(). |
|
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(), Run(), DefaultController::Run(), and AngularRateController::Run(). |