Table of Contents

Class VSCMG

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

This components models a variable speed control moment gyroscope (VSCMG) connected to a rigid body. VSCMG may be constructed from three different model: balanced wheels, simple jitter, and fully-coupled imbalanced wheel.

public class VSCMG : StateEffector
Inheritance
VSCMG
Inherited Members

Constructors

VSCMG()

public VSCMG()

Fields

In_ArrayMotorTorqueMsg

The input array of motor torques applied to the moment gyroscope

public VSCMGArrayMotorTorqueMessage In_ArrayMotorTorqueMsg

Field Value

VSCMGArrayMotorTorqueMessage

Out_ArrayMotorTorqueMsg

Output message for VSCMG torques

public readonly List<VSCMGTorqueMessage> Out_ArrayMotorTorqueMsg

Field Value

List<VSCMGTorqueMessage>

Out_VSCMGArrayConfigMsg

Output Message for array of reaction wheel configs

public readonly VSCMGArrayConfigMessage Out_VSCMGArrayConfigMsg

Field Value

VSCMGArrayConfigMessage

Out_VSCMGSpeedMsg

Output message for VSCMG speeds

public VSCMGSpeedMessage Out_VSCMGSpeedMsg

Field Value

VSCMGSpeedMessage

VSCMGData

List of reaction wheel messages

public List<VSCMGConfigMessage> VSCMGData

Field Value

List<VSCMGConfigMessage>

Methods

AddVSCMG(VSCMGConfigMessage)

Adds in another reaction wheel to the reaction wheel system payload

public void AddVSCMG(VSCMGConfigMessage message)

Parameters

message VSCMGConfigMessage

A new message reference to add

ComputeDerivatives(double, Vector3, Vector3, Vector3)

Computers the Derivatives of the Body along with the Kinematic Derivatives

public override void ComputeDerivatives(double time, Vector3 rDDot_BN_N, Vector3 omegaDot_BN_B, Vector3 sigma_BN)

Parameters

time double

The current computation time

rDDot_BN_N Vector3

The acceleration in the body frame

omegaDot_BN_B Vector3

The derivative of the attitude rate in the body frame

sigma_BN Vector3

The current attitude in the body frame

CreateVSCMG(double, double, Vector3, Vector3, Vector3, Vector3, Vector3, VSCMGType, double, double, double, double, bool, double, double, double, bool, bool, double, double, double, double, double, double, double, double, double, double, double, double, double, double)

Creates a new reaction wheel to add to the payload

public void CreateVSCMG(double wheelMass, double gimbalMass, Vector3 rGB_B, Vector3 wheelSpinAxis0_B, Vector3 gimbalSpinAxis_B, Vector3 IG, Vector3 rGcG_G, VSCMGType wheelModelType = VSCMGType.Balanced, double omega = 0, double omegaMax = 6000, double gammaDot = 0, double gammaDotMax = 6000, bool useFriction = false, double frictionCoulombWheel = 0, double wheelLinearFrictionRatio = 0, double gimbalLinearFrictionRatio = 0, bool useMinTorque = false, bool useMaxTorque = false, double maxTorqueWheel = 0, double maxTorqueGimbal = 0, double currentTorqueWheel = 0, double currentTorqueGimbal = 0, double minTorqueWheel = 1E-05, double minTorqueGimbal = 1E-05, double maxMomentumWheel = 100, double frictionCoulombGimbal = 0, double staticImbalance = 0, double dynamicImbalance = 0, double l = 0.01, double L = 0.1, double theta = 0, double gamma = 0)

Parameters

wheelMass double

[kg] Gyroscope wheel mass

gimbalMass double

[kg] Gyroscope gimbal mass

rGB_B Vector3

[m] Position of the gimbal relative to the body origin, in body-frame coordinates

wheelSpinAxis0_B Vector3

[-] Spin axis unit vector gsHat in body-frame coordinates, measured with gimbal angle gamma = 0

gimbalSpinAxis_B Vector3

[-] Spin axis unit vector ggHat in body-frame coordinates

IG Vector3

[kg*m^2] Vector of principal moments of inertia of the gimbal

rGcG_G Vector3

[m] Position of the gimbal centre of mass relative to the gimbal origin, in gimbal-frame coordinates

wheelModelType VSCMGType

[-] Gyroscope model type such as BalancedWheels, JitterSimple and JitterFullyCoupled

omega double

[RPM] Initial wheel speed

omegaMax double

[RPM] Maximum wheel speed

gammaDot double

[RPM] Initial gimbal speed

gammaDotMax double

[RPM] Maximum gimbal speed

useFriction bool

[-] Set to TRUE to turn on internal wheel friction

frictionCoulombWheel double

[N*m] Maximum wheel friction. Friction is linear with speed up to this value

wheelLinearFrictionRatio double

[-] Fraction of the maximum wheel speed at which the friction saturates

gimbalLinearFrictionRatio double

[-] Fraction of the maximum gimbal speed at which the friction saturates

useMinTorque bool

[-] Set to TRUE to clip any torque below a minimum torque value to 0

useMaxTorque bool

[-] Set to TRUE to clip any torque value above a maximum torque value to that maximum

maxTorqueWheel double

[N*m] Maximum wheel motor torque

maxTorqueGimbal double

[N*m] Maximum gimbal motor torque

currentTorqueWheel double

[N*m] Initial wheel torque

currentTorqueGimbal double

[N*m] Initial gimbal torque

minTorqueWheel double

[N*m] Minmum wheel motor torque

minTorqueGimbal double

[N*m] Minimum gimbal motor torque

maxMomentumWheel double

[Nms] Maximum wheel angular momentum. Used to calculate moment of inertia

frictionCoulombGimbal double

[N*m] Maximum gimbal friction. Friction is linear with speed up to this value

staticImbalance double

[kg*m]*10^-6 static wheel imbalance parameter

dynamicImbalance double

[kg*m^2]*10^-6 dynamic wheel imbalance parameter

l double

[m] Distance of the wheel centre of mass from the gimbal spin axis along the wheel spin axis

L double

[m] Height of the wheel spin axis above the gimbal origin

theta double

[deg] Initial wheel angle

gamma double

[deg] Initial gimbal angle

LinkInStates(StateProperties)

Links any state variables

public override void LinkInStates(StateProperties properties)

Parameters

properties StateProperties

The current list of states

OnBegin(double)

Called when the 'Component' is beginning

protected override void OnBegin(double time)

Parameters

time double

current time (seconds)

OnReset(double)

Called when the 'Component' is reset from a simulation

protected override void OnReset(double time)

Parameters

time double

reset time (seconds)

OnUpdate(double, double)

Called when the 'Component' should update

protected override void OnUpdate(double time, double step)

Parameters

time double

current time (seconds)

step double

the time step (seconds)

ReadInputs()

Reads the input messages and adds information to the instance

protected void ReadInputs()

RegisterStates(StateProperties)

Registers any of the states to the state parameters

public override void RegisterStates(StateProperties properties)

Parameters

properties StateProperties

The current list of states

UpdateContributions(double, ref BackSubstitutionMatrices, Vector3, Vector3, Vector3)

Subsitutes in the BackSubstitutionMatrices and performs some calculations.

public override void UpdateContributions(double time, ref BackSubstitutionMatrices backSubContribution, Vector3 sigma_BN, Vector3 omega_BN_B, Vector3 g_N)

Parameters

time double

The current time [s]

backSubContribution BackSubstitutionMatrices

A reference to the Matrices

sigma_BN Vector3

The current Attitude

omega_BN_B Vector3

The current Attitude rate

g_N Vector3

The spacecraft local gravity vector

UpdateEnergyMomentumContributions(double, ref Vector3, ref double, Vector3)

Computes the Energy and Momentum Contributions from the Body

public override void UpdateEnergyMomentumContributions(double time, ref Vector3 rotAngMomPntCContr_B, ref double rotEnergyContr, Vector3 omega_BN_B)

Parameters

time double

The current time [s]

rotAngMomPntCContr_B Vector3

A reference to the Angular Momentum Vector

rotEnergyContr double

A reference to the Energy Contribution value

omega_BN_B Vector3

The current Attitude Rate of the body

UpdateMassProperties(double, double)

Updates the mass properties of the current physical object at a particular time.

public override void UpdateMassProperties(double time, double step)

Parameters

time double

[s] The current time of the simulation

step double

[s] The delta time between the updates

WriteOutputMessages(double)

Updates the payload messages with some new states

protected void WriteOutputMessages(double time)

Parameters

time double

The current time [s]

WriteOutputStateMessages(double)

Writes state messages after integration

public override void WriteOutputStateMessages(double time)

Parameters

time double

The current time [s]