Spacecraft Control Framework 1.0
Spacecraft Control Library
Files | Classes | Typedefs | Functions
Control

Classes and functions for modeling 3 phase motors. More...

Files

file  sc_control.h
 Control functions.
 
file  sc_lambert.h
 Lambert method.
 
file  sc_orbit_mnvr.h
 Orbit maneuver algorithms.
 

Classes

class  Filter
 
struct  lambert_out
 Structure for storing the data output the Lambert TOF solver. More...
 
class  PD
 
class  PID3Axis
 
class  pm_machine_abc
 pm_machine_abc I% Assumes a 3 phase machine in a Y connection. More...
 
class  pm_machine_dq
 pm_machine_dq More...
 
class  pm_machine_torque_control
 pm_machine_torque_control More...
 
class  pm_machine_ukf
 pm_machine_ukf Implement space vector pulsewidth modulation. More...
 
class  PulseWidthLP
 Multi-Thruster Pulsewidth Solution using Linear Program Formulation. More...
 
class  relative_state_from_points
 Generates transformaton matrix and offset plus camera parameters from points. More...
 
class  state_space
 State space model. More...
 
class  svpwm
 SVPWM Implement space vector pulsewidth modulation. More...
 
class  UKF
 Unscented Kalman Filter class. More...
 

Typedefs

typedef struct lambert_out lambert_out
 Structure for storing the data output the Lambert TOF solver.
 

Functions

ml_matrix momentum_unloading (const ml_matrix &u, const ml_matrix &b, double gain, const ml_matrix &h, double tol=0.2)
 Momentum management using magnetic torquers. More...
 
ml_matrix momentum_with_rwa_body (const ml_matrix &inr, const ml_matrix &omega_body, const ml_matrix &omega_rwa, const ml_matrix &u_rwa, double inr_rwa)
 Momentum with RWA in the body frame. More...
 
ml_matrix magnetic_control (const ml_matrix &torque_demand, const ml_matrix &u_magnetic_torquer, const ml_matrix &b_field, double cost)
 Magnetic torquer control.
 
ml_matrix discrete_state_transition_matrix (const ml_matrix &w, double dT)
 State transition matrix. More...
 
ml_matrix attitude_propagation_discrete (const ml_matrix &w, const ml_matrix &q, double dT)
 State propagation. More...
 
lambert_out lambert_tof (const ml_matrix &r1, const ml_matrix &r2, double dT, int orbitType=1, double mu=3.98600436e5, double tol=1e-10, int maxIter=20)
 Solves the Lambert time of flight problem using Battin's method. More...
 

Detailed Description

Classes and functions for modeling 3 phase motors.

Momentum management using magnetic torquers.

Classes and functions for perfoming control calculations.

This includes all classes and functions related to guidance, estimation, control, and distribution.

Function Documentation

◆ momentum_unloading()

ml_matrix momentum_unloading ( const ml_matrix &  u,
const ml_matrix &  b,
double  gain,
const ml_matrix &  h,
double  tol 
)

Momentum management using magnetic torquers.

Parameters
u(3,n) Dipole unit vectors in the frame of h
b(3,1) Magnetic field vector in the frame of h
gainProportional gain
h(3,1) Momentum
tolTolerance on using a dipole
Returns
m (n,1) Dipole moments

References pinv().

◆ momentum_with_rwa_body()

ml_matrix momentum_with_rwa_body ( const ml_matrix &  inr,
const ml_matrix &  omega_body,
const ml_matrix &  omega_rwa,
const ml_matrix &  u_rwa,
double  inr_rwa 
)

Momentum with RWA in the body frame.

Momentum with RWA in the body frame.

Parameters
inr(3,3) Inertia matrix
omega_body(3,1) Body rate
omega_rwa(n,1) RWA rotation rate
u_rwa(3,n) RWA unit vectors
inr_rwaTolerance on using a dipole
Returns
h (3,1) Angular momentum in the body frame

◆ discrete_state_transition_matrix()

ml_matrix discrete_state_transition_matrix ( const ml_matrix &  w,
double  dT 
)

State transition matrix.

State transition matrix.

The plant equations are qDot = -skew(w)*angle + b/2 bDot = zeros(3,3); This function uses a 5th order expansion. For |w| = 1 this routine will be equivalent to C2DZOH to 1e-14 if dT < 0.03125 sec.

Parameters
w(3,1) Rate vector
dT(1,1) Time step
Returns
phi (6,6) State transition matrix

References skew_symmetric().

◆ attitude_propagation_discrete()

ml_matrix attitude_propagation_discrete ( const ml_matrix &  w,
const ml_matrix &  q,
double  dT 
)

State propagation.

State propagation.

Parameters
w(3,1) Angular velocity
q(4,1) Old quaternion
dT(1,1) Time change
Returns
q (4,1) Updated quaternion

References skew_symmetric().

◆ lambert_tof()

lambert_out lambert_tof ( const ml_matrix &  r1,
const ml_matrix &  r2,
double  dT,
int  orbit_type,
double  mu,
double  tol,
int  maxIter 
)

Solves the Lambert time of flight problem using Battin's method.

Solves the Lambert time of flight problem using Battin's method.

Parameters
dataOrbital elements for the satellite.
posposition "r" matrix to be returned (km).
velvelocity "v" matrix to be returned (km/s).

Orbit insertion maneuver

Parameters
dataOrbital elements for the satellite.
posposition "r" matrix to be returned (km).
velvelocity "v" matrix to be returned (km/s).

Bilinear tangent

Parameters
dataOrbital elements for the satellite.
posposition "r" matrix to be returned (km).
velvelocity "v" matrix to be returned (km/s).

Lambert's law maneuver

Parameters
r1initial position.
r2final position.
dTtime of flight.
orbit_type1 = posigrade, -1 = retrograde.
mugravitational parameter.
toltolerance for iteration.
maxIterMaximum number of iterations.
Returns
out lambert data structure

References lambert_out::a, Lambert(), lambert_out::p, lambert_out::tol, and lambert_out::vT.