Join/Login

Business Software

Open Source Software

For Vendors

Blog

About

More

Articles

Create

SourceForge Podcast

Site Documentation

Subscribe to our Newsletter

Support Request

For Vendors Help Create Join Login

Business Software

Open Source Software

SourceForge Podcast

Resources

Articles

Case Studies

Blog

Menu

Help

Create

Join

Login

Home

Browse

ISS SPHERES

Code(Git)

ISS SPHERES Code(Git)

SPHERES Facility software for scientists

Status: Alpha
Brought to you by: alvarso, danroa, dmiller7115, jvbenavi, sphereseng

Summary

Files

Reviews

Support

Code(SVN)

Code(Git)

Mailing Lists

Menu ▾ ▴

Browse Commits

Fork

Merge Requests 0

Branches

master

[66ae6b]: / SSSM / SPHERES_SSSM_ISS_Config.m  Maximize  Restore  History

Download this file

141 lines (119 with data), 6.4 kB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

%% Simple SPHERES Simulation Model Configuration Set-up

% San Jose State University, Control Science and Dynamic Systems Laboratory

% D. Somavarapu, F. Sun, K. Turkoglu

% Last Modified: November 06, 2015 9.08am

%% Clean up everything

clear all, close all, clc;

%% 1) SIMULATION SET-UP:

% In this section, simulation parameters are defined

SimTime = 200; % [sec], simulation time

dyn_sampling_time = 1e-3; % [sec], Dynamics sampling time, 1 ms by default

thrusterDelay=1; % [samples], Delay between actuation dynamics and plant dynamics

is2D = 0; % Is the simulation 2 dimensional or 3D

% [1] ==> 2D

% [0] ==> 3D

% Initial conditions for the simulation state vector dynamics

% x0 = [ x y z xdot ydot zdot q1 q2 q3 q4 w1 w2 w3 ]^T

x0=[0 0 0 0 0 0 0 0 0 1 0 0 0]';

% Desired commands (trajectory) for target position, velocity, attitude and rates

% x_comm = [ x y z xdot ydot zdot q1 q2 q3 q4 w1 w2 w3 ]^T

x_comm=[0.5 -0.5 0 0 0 0 0 0 0 1 0 0 0]';

%% 2) CONSTANT PARAMETERS of SPHERES DYNAMICS:

% This section provides numerical data of core SPHERES dynamics parameters

thrusterForce = 0.098; % [N], Nominal effective thrust force

mass = 4.45; % [kg], Mass of SPHERES at the beginning of the simulation

% Thruster Noise and Adjustment Parameters

thrNoiseOn=1; % noise flag, ON or OFF

thrNoiseRange=0.05; % noise range for random number generator

thrNoiseSeed=3.931305793000000e+09; % seed for random number generation,

% could be generated separately for each execution based on initseeds.m

% logic from MIT model

% Calculate the mean motion n of ISS, or other micro-gravity facility or

% the lab on Earth

r0=6378+409; % [km], Orbital Radious of ISS

Mu=398600; % [km^3/s^2], Gravitational Constant or Earth,

n=sqrt(Mu/r0^3); % [1/sec], Mean Motion

% Inertia matrix of SPHERES

J = [0.028520000000000 , -8.370000000000000e-05, 1.400000000000000e-05;...

-8.370000000000000e-05 , 0.028317000000000 , -2.900000000000000e-04;...

1.400000000000000e-05 , -2.900000000000000e-04 , 0.024500000000000];

% Thurster configuration matrix for SPHERES dynamics block: This matrix

% indicates the multipliers for obtaining force and torque along of the 6

% axes (3 positive, 3 negative)

thrustMat=[1 1 0 0 0 0 -1 -1 0 0 0 0;

0 0 1 1 0 0 0 0 -1 -1 0 0;

0 0 0 0 1 1 0 0 0 0 -1 -1;

0 0 0 0 0.0965 -0.0965 0 0 0 0 -0.0965 0.0965;

0.0965 -0.0965 0 0 0 0 -0.0965 0.0965 0 0 0 0;

0 0 0.0965 -0.0965 0 0 0 0 -0.0965 0.0965 0 0;];

% Actuation Dynamics block constants

control_period=1; %[sec], period for control computations

duty_cycle=40; % percent-wise, {%}, maximum allowed time for control

% to be active within control period.

min_pulse_width=10; % [ms], minimum pulse width for thruster to be effective

force_frame=0; % [0] for inertial,

% [1] for body

% Mixing Matrix: determines and defines the effective pair-wise forces along

% x,y and z axes.

% Ref: Taken from Mark Hilstad's master's thesis, it's on page 38.

% Hilstad, M., "A Multi-Vehicle Testbed and Interface Framework for the

% Development and Verification of Separated Spacecraft Control Algorithms",

% MIT SPHERES Library,

% http://ssl.mit.edu/publications/theses/SM-2002-HilstadMark.html

% [retrieved 1 May 2015]

mixing_matrix= [0.5 0.0 0.0 0.0 0.5 0.0;...

0.5 0.0 0.0 0.0 -0.5 0.0;...

0.0 0.5 0.0 0.0 0.0 0.5;...

0.0 0.5 0.0 0.0 0.0 -0.5;...

0.0 0.0 0.5 0.5 0.0 0.0;...

0.0 0.0 0.5 -0.5 0.0 0.0];

vehicle_thrust_force = thrusterForce;

vehicle_moment_arm = 0.0965; % [m], Torque moment arm

%% 3) CONTROLLER CONSTANTS:

% =========================================================================

% This section is user defined, and can be modified FREELY to adjust any

% parameter with regards to the specified control algortihm

%

% For conventional SPHERES set-up, followings define gains for a [P-D]

% Controller for translational motion [x, y, z], and [P] Controller for

% attitude [q1, q2, q3, q4] and rotational dynamics [w1, w2, w3]

gains=[0.172; 0.172; 0.172; ... % [P] gains for [x,y,z]

1.72; 1.72; 1.72; ... % [D] gains for [x,y,z]

0.0036; 0.0036; 0.0036; 0.0036;... % [P] gains for [q1, q2, q3, q4]

0.0135; 0.0135; 0.0135]; ... % [P] gains for [w1, w2, w3]

% =========================================================================

%% 4) SIMULATION RESULTS:

% In this section simulation is executed with respect to the defined

% parameters and configuration.

% sim('SPHERES_SSSM_Open_Loop_Test')

sim('Simple_SPHERES_Simulation_Model');

% Save the results to a file

filename = ['sssm_' datestr(now,'yyyy_mm_dd_HH_MM_SS') '.mat'];

disp(['Saving results to file: ' filename ])

save(filename);

% Plot the results

plot_sssm_results;

%%

% Copyright (c) 2015, San Jose State Universtity Control Science & Dynamical Systems (CSDy) Laboratory

% All rights reserved.

%

% Redistribution and use in source and binary forms, with or without modification, are permitted

% provided that the following conditions are met:

% Redistributions of source code must retain the above copyright notice, this list of conditions and

% the following disclaimer.

% Redistributions in binary form must reproduce the above copyright notice, this list of conditions and

% the following disclaimer in the documentation and/or other materials provided with the distribution.

% Neither the name of the Massachusetts Institute of Technology, the MIT Space Systems Laboratory, nor

% the names of its contributors may be used to endorse or promote products derived from this software

% without specific prior written permission.

%

% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR

% IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND

% FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR

% CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

% DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,

% WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

%

% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

%

SourceForge

Create a Project

Open Source Software

Business Software

Top Downloaded Projects

Company

About

Team

SourceForge Headquarters
225 Broadway Suite 1600
San Diego, CA 92101
+1 (858) 422-6466

Resources

Support

Site Documentation

Site Status

SourceForge Reviews

© 2025 Slashdot Media. All Rights Reserved.

Terms Privacy Opt Out Advertise

×
Want the latest updates on software, tech news, and AI?

Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.

Submit