Table of Contents

Class ReactionWheelArray

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

[Nominal] This components models a reaction wheel array connected to a rigid body. Reaction wheel arrays may be constructed from three different model: balanced wheels, simple jitter, and fully-coupled imbalanced wheels.

public class ReactionWheelArray : StateEffector, IPowerAttachment
Inheritance
ReactionWheelArray
Implements
Inherited Members

Constructors

ReactionWheelArray()

Default constructor for setting up the wheels

public ReactionWheelArray()

Fields

In_ArrayMotorTorqueMsg

Message ID for incoming motor torque data

public ArrayMotorTorqueMessage In_ArrayMotorTorqueMsg

Field Value

ArrayMotorTorqueMessage

Out_RWArrayConfigMsg

Output Message for array of reaction wheel configs

public RWArrayConfigMessage Out_RWArrayConfigMsg

Field Value

RWArrayConfigMessage

Out_RWSpeedMsg

Output message for the reaction wheels

public RWSpeedMessage Out_RWSpeedMsg

Field Value

RWSpeedMessage

Properties

CenterOfMassL_L

[m] The center of mass of the component within its own local coordinates. This does not include any of the sub-components.
Overridden to always return Vector3(0,0,0)

public override Vector3 CenterOfMassL_L { get; set; }

Property Value

Vector3

GsMatrix_B

[-] The RW spin axis matrix in body frame components

[EditableVariable("-", true, "", "")]
public Matrix GsMatrix_B { get; set; }

Property Value

Matrix

this[int]

Overrides the index operator which will attempt to get the reaction wheel child.

public ReactionWheel? this[int key] { get; }

Parameters

key int

The index to get

Property Value

ReactionWheel

A reaction wheel reference

JsList

[kg m^2] The spin axis inertia for RWs

[EditableVariable("kg-m^2", true, "", "")]
public double[] JsList { get; set; }

Property Value

double[]

Mass

The mass of the reaction wheel array, excluding child objects. Overriden to always return 0.

public override double Mass { get; set; }

Property Value

double

MomentOfInertiaL_L

[kg m^2] The moment of inertia of the component within its own local coordinates. This does not include any of the sub-components.
Overriden to always return a Matrix of 0.

public override Matrix3 MomentOfInertiaL_L { get; set; }

Property Value

Matrix3

NumPreparedRW

[-] The number of reaction wheels linked to the RWArray config message.

[Units("-")]
public int NumPreparedRW { get; set; }

Property Value

int

NumRW

[-] The number of reaction wheels in this array.

[EditableVariable("-", true, "", "")]
public int NumRW { get; }

Property Value

int

UMax

[Nm] The maximum RW motor torque

[EditableVariable("Nm", true, "", "")]
public double[] UMax { get; set; }

Property Value

double[]

Methods

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

CreateReactionWheel(double, Vector3, Vector3, ReactionWheelType, double, double, bool, bool, bool, double, double, double, double, double, double, double, double, double)

Creates a new reaction wheel to add to the payload

public ReactionWheel CreateReactionWheel(double wheelMass, Vector3 rWB_B, Vector3 wheelSpinAxis_B, ReactionWheelType wheelModelType = ReactionWheelType.Balanced, double Omega = 0, double Omega_max = 6000, bool useFriction = false, bool useMinTorque = false, bool useMaxTorque = false, double maxTorque = 0, double minTorque = 1E-05, double maxMomentum = 100, double frictionCoulomb = 0, double frictionStatic = 0, double betaStatic = -1, double frictionViscous = 0, double staticImbalance = 0, double dynamicImbalance = 0)

Parameters

wheelMass double

[kg] RW mass

rWB_B Vector3

[m] Position vector of the RW relative to the spacecraft body frame

wheelSpinAxis_B Vector3

[-] Spin axis unit vector gsHat in B-frame components

wheelModelType ReactionWheelType

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

Omega double

[RPM] Initial RW speed

Omega_max double

[RPM] Maximum RW speed

useFriction bool

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

useMinTorque bool

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

useMaxTorque bool

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

maxTorque double

[Nm] Maximum RW motor torque

minTorque double

[Nm] Minimum RW motor torque

maxMomentum double

[Nms] Maximum RW wheel momentum in Nms

frictionCoulomb double

[Nm] Coulomb friction torque model

frictionStatic double

[Nm] Static friction torque magnitude

betaStatic double

[-] Stribeck friction coefficient, positive turns Stribeck friction on, negative turns this friction off

frictionViscous double

[-] Viscous friction coefficient

staticImbalance double

[kg*m]*10^-6 static RW imbalance

dynamicImbalance double

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

Returns

ReactionWheel

GetReactionWheelMessage(int)

Return a reference to the message of the reaction wheel at the specified index.

public ReactionWheelMessage GetReactionWheelMessage(int index)

Parameters

index int

The index of the reaction wheel within the array.

Returns

ReactionWheelMessage

IsChildTypeSupported(Type)

Returns true if 'Component' type is a supported child

protected override bool IsChildTypeSupported(Type type)

Parameters

type Type

a 'Component' type

Returns

bool

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)

OnPostAttachChild(Component)

Called after the 'Component' has attached a component

protected override void OnPostAttachChild(Component child)

Parameters

child Component

The child component

OnPostDetachChild(Component)

Called after the 'Component' has detached a component

protected override void OnPostDetachChild(Component child)

Parameters

child Component

The child component

OnPreDetachChild(Component)

Called before the 'Component' detaches a component

protected override void OnPreDetachChild(Component child)

Parameters

child Component

The child component

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

UpdateThermalProperties(double)

Updates the thermal properties of the current physical component at a particular time.

public override void UpdateThermalProperties(double time)

Parameters

time double

[s] The current time in the simulation

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]