Path: CubeSat/AttitudeControl
% Simulate a rigid body with 3-axis attitude control. -------------------------------------------------------------------------- Form: data = AttitudeControlSimRWA( qEB0, wB0, qEBDes, t, inrBody, inrWhl, ... maxRate, control ); -------------------------------------------------------------------------- ------ Inputs ------ qEB0 (4,1) Initial ECI to Body quaternion qEBDes (4,:) Desired ECI to Body quaternion over time t (1,:) Time vector (sec) inrBody (3,3) Inertia matrix for the rigid body inrWhl (3,1) Wheel inertias. Enter a scalar if all the same. maxRate (1,1) Maximum slew rate (rad/s) control (.) Control data structure with fields: .a A matrix of discretestate space controller .b B matrix of discretestate space controller .c C matrix of discretestate space controller .d D matrix of discretestate space controller .tSamp Sampling time (sec) ------- Outputs ------- data (.) Data structure with fields: .t (1,:) Time vector (intervals at tSamp) .qEB (4,:) ECI to Body quaternion .wB (3,:) Body rate (rad/s) .torque (3,:) Body torque (Nm) .wW (3,:) Wheel rates (rad/s) .power (3,:) Required power draw (Watts) --------------------------------------------------------------------------
AerospaceUtils: Coord/QIToBDot SC: Dynamics/FRB SC: Dynamics/RBModel Common: CommonData/SwooshWatermark Common: Control/C2DZOH Common: Control/C2DelZOH Common: Control/FResp Common: Control/GND Common: Control/GSS Common: Control/ND2SS Common: Control/PIDMIMO Common: Control/S2Damp Common: Control/SS2ND Common: Control/SizeABCD Common: Control/TrnsZero Common: Control/WPZ Common: Control/WReson Common: Control/ZFresp Common: General/CellToMat Common: General/MatToCell Common: General/Watermark Common: Graphics/LogLimit Common: Graphics/NewFig Common: Graphics/Plot2D Common: Graphics/PltStyle Common: Graphics/TextS Common: Quaternion/AU2Q Common: Quaternion/Q2AU Common: Quaternion/QMult Common: Quaternion/QPose Math: Integration/RK4 Math: Linear/ColCompR Math: Linear/Cross Math: Linear/DelLZ Math: Linear/IsZero Math: Linear/Mag Math: Linear/RowCompU Math: Linear/SkewSymm Math: Linear/Unit
Back to the CubeSat Module page