Table Of Contents

Search

Enter search terms or a module, class or function name.

actuators module

Actuators module for attitude determination and control system.

This module models actuator behavior and contains a class that stores reaction wheel state and methods.

class actuators.Actuators(rxwl_mass, rxwl_radius, w_rxwls=array([0, 0, 0]), rxwl_max_torque=inf, rxwl_max_momentum=inf, noise_factor=0.0)

Bases: object

A class to store reaction wheel state and methods

Parameters:
  • rxwl_mass (float) – the mass of the reaction wheel (kg)
  • rxwl_radius (float) – the radius of the reaction wheel (m)
  • w_rxwls (numpy ndarray, optional) – Defaults to np.array([0, 0, 0]). The starting angular velocity of the x, y, and z reaction wheels.
  • rxwl_max_torque (float, optional) – Defaults to np.inf. The maximum torque (N * m) that a given reaction wheel can apply. If infinity, there is no limit.
  • noise_factor (float, optional) – Defaults to 0.0 (perfect).The standard deviation of the Gaussian noise distribution centered at 0. Used to apply noise to the actuation of control torques.
C_w

float – the moment of inertia of the wheels about their spin axes

w_rxwls

numpy ndarray – the angular velocity of the reaction wheels

rxwl_max_torque

float) the maximum torque (N * m – reaction wheel can apply. If infinity, there is no limit.

rxwl_max_momentum

float – the maximum momentum (N * m * s) that a given reaction wheel can have before saturation. If infinity, there is no limit.

noise_vals

numpy ndarray – a cache of pre-generated noise values to aid in the addition of noise

add_noise(value, rxwl, t, delta_t)

Adds Gaussian noise to a given value

NOTE: This method uses a cache of random values generated in this
class’s constructor. This is done to (1) reduce the overhead of many individual rvs calls and (2) ensure that all adaptive integrator steps in between user-defined steps use the same noise value (so that the dynamics are not constantly changing). Without this, the integrator fails to move forward in time. Therefore, a custom hash function is used to apply the same noise is necessary cases.
Parameters:
  • value (float) – some value to be made noisier
  • rxwl (int) – the rxwl number (0, 1, or 2)
  • t (float) – the current simulation time in seconds
  • delta_t (float) – the time between user-defined integrator steps (not the internal/adaptive integrator steps) in seconds
Returns:

the value with some Gaussian noise applied

Return type:

float

apply_control_torques(M_ctrl, w_sc, t, delta_t)

Applies the control torques to the modeled reaction wheels

Parameters:
  • M_ctrl (numpy ndarray) – the control torque (3x1) produced by the PD controller (N * m)
  • w_sc (numpy ndarray) – the angular velocity (rad/s) (3x1) in body coordinates of the spacecraft (at a given time)
  • t (float) – the current simulation time in seconds
  • delta_t (float) – the time between user-defined integrator steps (not the internal/adaptive integrator steps) in seconds
Returns:

the control moment (3x1) as actually applied on

the reaction wheels (the input control torque with some Gaussian noise applied) (N * m)

numpy ndarray: the angular acceleration of the 3 reaction wheels

applied to achieve the applied torque (rad/s^2)

Return type:

numpy ndarray

Scroll To Top