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

[c3d83a]: / SSSM / SPHERES_SSSM_ISS_Config.m  Maximize  Restore  History

Download this file

121 lines (96 with data), 4.5 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

%% Clean up everything

clear all;

close all;

clc;

%% Set all the constants

% Simulation Time

SimTime = 200;

% Dynamics sampling time, 1 ms by default

dyn_sampling_time = 1e-3;

% Delay between actuation dynamics and plant dynamics

thrusterDelay=1;

% Is the simulation 2 dimensional?

is2D = 0;

% Constants for SPHERES Dynamics

% Nominal effective thrust force

thrusterForce = 0.098;

% Mass of SPHERES at the beginning of the simulation in kilograms

mass = 4.45; % kg

% Is there thruster noise

thrNoiseOn=1;

thrNoiseRange=0.05;

thrNoiseSeed=3.931305793000000e+09;

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

% the lab on Earth

r0=6378+409; % Orbital Radious of ISS in kilo-meters

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

n=sqrt(Mu/r0^3); % Mean Motion per second

% Set the inertia matrix for SPHERES at the beginning of simulation

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 postive, 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

duty_cycle=40;% values in [0,100]

control_period=1;% in seconds

min_pulse_width=10; % in milliseconds

force_frame=0;% 0 for inertial, 1 for body

% The following matrix is taken from Mark Hilstad's master's thesis, it's

% on page 38. This matrix determines the effective pair-wise forces along

% x,y and z axes.

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; % In meters

% Specify Controller constants

% gains for the PD Controller

gains=[0.172; 0.172; 0.172; 1.72; 1.72; 1.72; 0.0036; 0.0036; 0.0036; 0.0036; 0.0135; 0.0135; 0.0135];

% Set the initial conditions for the simulation

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

% Set the commands for target position, velocity, attitude and rates

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

% Run the simulation

% sim('SPHERES_SSSM_Open_Loop_Test')

sim('SPHERES_SSSM_Manual_PD_Test');

% 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